Add updated_at column to users table and remove debug logging from profile update handler

This commit is contained in:
Leon Bösche
2026-01-29 12:39:59 +01:00
parent 2678ea2e8a
commit 7741bd5ccc
3 changed files with 4 additions and 3 deletions

View File

@@ -159,6 +159,9 @@ class _AccountSettingsDialogState extends State<AccountSettingsDialog> {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Profile updated successfully')),
);
// Close the dialog
Navigator.of(context).pop();
}
} catch (e) {
print('DEBUG: _updateProfile error: $e');

View File

@@ -3857,7 +3857,6 @@ func getUserProfileHandler(w http.ResponseWriter, r *http.Request, db *database.
// updateUserProfileHandler updates the current user's profile information
func updateUserProfileHandler(w http.ResponseWriter, r *http.Request, db *database.DB, auditLogger *audit.Logger) {
log.Printf("DEBUG: updateUserProfileHandler called")
userIDStr, ok := middleware.GetUserID(r.Context())
if !ok {
errors.WriteError(w, errors.CodeUnauthenticated, "Unauthorized", http.StatusUnauthorized)
@@ -3881,8 +3880,6 @@ func updateUserProfileHandler(w http.ResponseWriter, r *http.Request, db *databa
return
}
log.Printf("DEBUG: updateUserProfileHandler req: displayName=%v, email=%v, avatarUrl=%v", req.DisplayName, req.Email, req.AvatarURL)
// Build dynamic update query
var setParts []string
var args []interface{}

View File

@@ -0,0 +1 @@
ALTER TABLE users ADD COLUMN updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW();