refactor(store): single account name on users; rename profile/laps tables
users.display_name becomes users.name and is now the only human-facing name -- profiles.name is dropped (it duplicated the account name; the Profile page's Name field now edits users.name through PUT /api/profile, which carries Name alongside the profiles columns). The profile table becomes profiles and laps becomes activity_laps, homogeneous with activity_samples. Onboarding pre-fills the display name from the OIDC claim's name. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -114,7 +114,7 @@ func (s *Server) handleSessionMe(w http.ResponseWriter, r *http.Request) {
|
||||
resp := sessionMeResponse{Name: claims.Name, Email: claims.Email}
|
||||
if u, found := userFromContext(r.Context()); found {
|
||||
resp.HasProfile = true
|
||||
resp.DisplayName = u.DisplayName
|
||||
resp.DisplayName = u.Name
|
||||
profile, err := s.DB.GetProfile(r.Context(), u.ID)
|
||||
if err != nil {
|
||||
writeError(w, http.StatusInternalServerError, err.Error())
|
||||
|
||||
Reference in New Issue
Block a user