diff --git a/internal/handlers/library.go b/internal/handlers/library.go index d8d0822..3d19bdb 100644 --- a/internal/handlers/library.go +++ b/internal/handlers/library.go @@ -3,6 +3,7 @@ package handlers import ( "bookhoard/internal/database" "bookhoard/internal/services" + "context" "net/http" "os" "path/filepath" @@ -302,3 +303,13 @@ func parseUUID(uuidStr string) (pgtype.UUID, error) { } return pgtype.UUID{Bytes: [16]byte(parsedUUID), Valid: true}, nil } + +// GetUserVisibleLibrariesData returns libraries for SSR (not JSON response) +func (h *LibraryHandler) GetUserVisibleLibrariesData(ctx context.Context, userID pgtype.UUID) ([]database.GetUserVisibleLibrariesRow, error) { + return h.libraryService.GetUserVisibleLibraries(ctx, userID) +} + +// GetLibraryTypeData returns all library types for SSR (not JSON response) +func (h *LibraryHandler) GetLibraryTypeData(ctx context.Context) ([]database.LibraryTypes, error) { + return h.libraryService.GetLibraryTypes(ctx) +}