feat(backend): implement custom services CRUD handlers

Add 6 admin endpoints for custom services: list (with search/popular/pagination), create, get, update, promote to regular service, and delete. Each handler validates admin role via middleware.

Ultraworked with Sisyphus (https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-06-15 16:58:01 +01:00
co-authored by Sisyphus
parent 3eaa59343f
commit ede0873c08
2 changed files with 511 additions and 0 deletions
+9
View File
@@ -291,6 +291,15 @@ func main() {
r.Delete("/{id}", admin.DeletePatchTest)
})
r.Route("/admin/custom-services", func(r chi.Router) {
r.Get("/", admin.GetCustomServices)
r.Post("/", admin.CreateCustomService)
r.Get("/{id}", admin.GetCustomService)
r.Put("/{id}", admin.UpdateCustomService)
r.Post("/{id}/promote", admin.PromoteCustomService)
r.Delete("/{id}", admin.DeleteCustomService)
})
r.Route("/admin/bookings", func(r chi.Router) {
r.Get("/", bookings.GetAllAdminBookingsHandler)
r.Post("/", bookings.AdminCreateBookingForUserHandler)