diff --git a/internal/handlers/auth.go b/internal/handlers/auth.go index 991ba0c..796939c 100644 --- a/internal/handlers/auth.go +++ b/internal/handlers/auth.go @@ -486,7 +486,14 @@ window.location.href = '%s'; // GetProfile handles GET /api/auth/profile func (h *AuthHandler) GetProfile(c *echo.Context) error { - user := MustGetAuthenticatedUser(c) + ctxUser := MustGetAuthenticatedUser(c) + // The context user is a JWT-claims stub (id/email/username/role) — + // it carries no theme. Read the full row: clients (the Android app) + // sync their app-chrome theme from this field. + user, err := h.db.GetUser(c.Request().Context(), ctxUser.ID) + if err != nil { + return c.JSON(http.StatusInternalServerError, map[string]string{"error": "failed to load profile"}) + } firstName := "" if user.FirstName.Valid {