diff --git a/VEZA_COMPLETE_MVP_TODOLIST.json b/VEZA_COMPLETE_MVP_TODOLIST.json index cec62c516..d9da24886 100644 --- a/VEZA_COMPLETE_MVP_TODOLIST.json +++ b/VEZA_COMPLETE_MVP_TODOLIST.json @@ -690,7 +690,7 @@ "completion": { "completed_at": "2025-12-23T00:41:32Z", "actual_hours": 1.0, - "commits": [], + "commits": ["ed8949ee76acabe3aba59860f4f757f577b60cba"], "files_changed": [ "veza-backend-api/internal/api/router.go", "veza-backend-api/internal/handlers/playlist_handler.go" @@ -772,7 +772,18 @@ "description": "Backend returns { success, data } but some handlers return nested structures (e.g., { profile: {...} }) while frontend expects flat data. Standardize all responses.", "owner": "fullstack", "estimated_hours": 4, - "status": "todo", + "status": "completed", + "completion": { + "completed_at": "2025-12-23T00:42:45Z", + "actual_hours": 1.0, + "commits": [], + "files_changed": [ + "veza-backend-api/internal/handlers/profile_handler.go", + "veza-backend-api/internal/handlers/playlist_handler.go" + ], + "notes": "Fixed nested response structures in handlers. Changed gin.H{\"profile\": profile} to profile (3 occurrences in profile_handler.go). Changed gin.H{\"playlist\": playlist} to playlist (3 occurrences in playlist_handler.go). Changed gin.H{\"collaborator\": collaborator} to collaborator (1 occurrence in playlist_handler.go). Frontend already has interceptor that unwraps { success, data } format correctly. All responses now use consistent { success: true, data: {...} } format where data contains the object directly, not nested in a key.", + "issues_encountered": [] + }, "files_involved": [ { "path": "veza-backend-api/internal/handlers/profile_handler.go", diff --git a/veza-backend-api/internal/handlers/playlist_handler.go b/veza-backend-api/internal/handlers/playlist_handler.go index 55c994245..14305fc77 100644 --- a/veza-backend-api/internal/handlers/playlist_handler.go +++ b/veza-backend-api/internal/handlers/playlist_handler.go @@ -109,7 +109,7 @@ func (h *PlaylistHandler) CreatePlaylist(c *gin.Context) { // MOD-P2-003: Enregistrer la métrique business (depuis le handler pour éviter cycle d'import) monitoring.RecordPlaylistCreated() - RespondSuccess(c, http.StatusCreated, gin.H{"playlist": playlist}) + RespondSuccess(c, http.StatusCreated, playlist) } // GetPlaylists gère la récupération des playlists avec pagination @@ -220,7 +220,7 @@ func (h *PlaylistHandler) GetPlaylist(c *gin.Context) { return } - RespondSuccess(c, http.StatusOK, gin.H{"playlist": playlist}) + RespondSuccess(c, http.StatusOK, playlist) } // UpdatePlaylist gère la mise à jour d'une playlist @@ -277,7 +277,7 @@ func (h *PlaylistHandler) UpdatePlaylist(c *gin.Context) { return } - RespondSuccess(c, http.StatusOK, gin.H{"playlist": playlist}) + RespondSuccess(c, http.StatusOK, playlist) } // DeletePlaylist gère la suppression d'une playlist @@ -575,7 +575,7 @@ func (h *PlaylistHandler) AddCollaborator(c *gin.Context) { return } - RespondSuccess(c, http.StatusCreated, gin.H{"collaborator": collaborator}) + RespondSuccess(c, http.StatusCreated, collaborator) } // RemoveCollaborator gère la suppression d'un collaborateur d'une playlist diff --git a/veza-backend-api/internal/handlers/profile_handler.go b/veza-backend-api/internal/handlers/profile_handler.go index 806388ce9..39f38d42e 100644 --- a/veza-backend-api/internal/handlers/profile_handler.go +++ b/veza-backend-api/internal/handlers/profile_handler.go @@ -68,7 +68,7 @@ func (h *ProfileHandler) GetProfile(c *gin.Context) { return } - RespondSuccess(c, http.StatusOK, gin.H{"profile": profile}) + RespondSuccess(c, http.StatusOK, profile) } // GetProfileByUsername retrieves a public profile by username @@ -104,7 +104,7 @@ func (h *ProfileHandler) GetProfileByUsername(c *gin.Context) { return } - RespondSuccess(c, http.StatusOK, gin.H{"profile": profile}) + RespondSuccess(c, http.StatusOK, profile) } // GetProfileCompletion retrieves the profile completion status @@ -291,7 +291,7 @@ func (h *ProfileHandler) UpdateProfile(c *gin.Context) { return } - RespondSuccess(c, http.StatusOK, gin.H{"profile": profile}) + RespondSuccess(c, http.StatusOK, profile) } // isValidUsername validates username format (alphanumeric + underscore, 3-30 chars)