From ab37bc359648514e8cf0952c2f91ee64b8d7e483 Mon Sep 17 00:00:00 2001 From: senke Date: Tue, 23 Dec 2025 01:49:21 +0100 Subject: [PATCH] [BE-API-003] be-api: Implement playlist search endpoint - Added GET /playlists/search route in router.go - Handler SearchPlaylists and service method already existed - Supports query params: q, user_id, is_public, page, limit - Service handles pagination, access control, and search filtering - Route added to protected playlist group Phase: PHASE-2 Priority: P1 Progress: 13/267 (4.9%) --- VEZA_COMPLETE_MVP_TODOLIST.json | 14 ++++++++++++-- veza-backend-api/internal/api/router.go | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/VEZA_COMPLETE_MVP_TODOLIST.json b/VEZA_COMPLETE_MVP_TODOLIST.json index 55bb33502..366ab299e 100644 --- a/VEZA_COMPLETE_MVP_TODOLIST.json +++ b/VEZA_COMPLETE_MVP_TODOLIST.json @@ -1197,7 +1197,7 @@ "completion": { "completed_at": "2025-12-23T00:48:15Z", "actual_hours": 1.0, - "commits": [], + "commits": ["624e397"], "files_changed": [ "veza-backend-api/migrations/930_add_missing_foreign_keys.sql" ], @@ -1258,7 +1258,17 @@ "description": "GET /api/v1/playlists/search with query params (q, page, limit, user_id, is_public)", "owner": "backend", "estimated_hours": 4, - "status": "todo", + "status": "completed", + "completion": { + "completed_at": "2025-12-23T00:49:14Z", + "actual_hours": 0.5, + "commits": [], + "files_changed": [ + "veza-backend-api/internal/api/router.go" + ], + "notes": "Added GET /playlists/search route in router.go. Handler SearchPlaylists and service method SearchPlaylists already existed and were fully implemented. Handler supports query params: q (search query), user_id (filter by user), is_public (filter by visibility), page, limit. Service handles pagination, access control (public vs private playlists), and search filtering. Route added to protected playlist group.", + "issues_encountered": [] + }, "files_involved": [], "implementation_steps": [ { diff --git a/veza-backend-api/internal/api/router.go b/veza-backend-api/internal/api/router.go index dafdc3fcf..6aee838e6 100644 --- a/veza-backend-api/internal/api/router.go +++ b/veza-backend-api/internal/api/router.go @@ -539,6 +539,7 @@ func (r *APIRouter) setupPlaylistRoutes(router *gin.RouterGroup) { { playlists.GET("", playlistHandler.GetPlaylists) playlists.POST("", playlistHandler.CreatePlaylist) + playlists.GET("/search", playlistHandler.SearchPlaylists) // BE-API-003: Playlist search endpoint playlists.GET("/:id", playlistHandler.GetPlaylist) // BE-SEC-003: Apply ownership middleware for PUT/DELETE /playlists/:id