Admin Carousel Dashboard: Submitted Slides Do Not Appear - #179
Merged
Conversation
The admin carousel dashboard called GET /admin/carousel to load submitted slides, but the route didn't exist, causing a 405 that the frontend silently swallowed. Add a list-all route mirroring the pattern used by every other admin router in this codebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The admin Carousel page calls
GET /api/admin/carouselto populate its slide list. This route did not exist -- the admin carousel router only definedPOST,PUT /reorder,PUT /{id}, andDELETE /{id}-- so the request 405'd, the error was caught silently, and the list always rendered empty even after slides were created.Changes:
GET /api/admin/carouselroute returning all slides (active and inactive) ordered bydisplay_order, protected byget_current_user, mirroring the list-all pattern used by every other admin routerGET /api/carouselroute (which filters tois_active == true) unchangedPUT /reorder(different HTTP method, same prefix)Closes #166