fix(auth): align user info fields and fix response parsing (#4)

This commit is contained in:
BBQ
2026-01-29 15:20:56 -08:00
committed by GitHub
parent e5f32bc7e0
commit d72e7b42f1
5 changed files with 24 additions and 4 deletions
+4
View File
@@ -34,6 +34,8 @@ type LoginResponse struct {
TokenType string `json:"token_type"`
ExpiresAt string `json:"expires_at"`
UserID string `json:"user_id"`
Role string `json:"role"`
DisplayName string `json:"display_name"`
Username string `json:"username"`
}
@@ -109,6 +111,8 @@ func (h *AuthHandler) Login(c echo.Context) error {
ExpiresAt: expiresAt.Format(time.RFC3339),
UserID: userID,
Username: user.Username,
Role: fmt.Sprintf("%v", user.Role),
DisplayName: user.DisplayName.String,
})
}