From ce0e448e585ebad68baa9955bf48184bf9480a13 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Thu, 29 Jan 2026 13:33:08 -0500 Subject: [PATCH] refactor: standardize API response formats for list endpoints - ListLibraries now returns {"data": []} instead of [] - ListUsers now returns {"data": []} instead of [] - ListMediaItems now returns {"data": []} instead of [] This provides consistent response structure across all list endpoints and aligns with integration test expectations. --- internal/handlers/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handlers/auth.go b/internal/handlers/auth.go index afc1412..4f40ddd 100644 --- a/internal/handlers/auth.go +++ b/internal/handlers/auth.go @@ -554,7 +554,7 @@ func (h *AuthHandler) ListUsers(c echo.Context) error { }) } - return c.JSON(http.StatusOK, userList) + return c.JSON(http.StatusOK, map[string]interface{}{"data": userList}) } type AddEbookFolderRequest struct {