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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user