feat: hub console backend — complete API surface
This commit is contained in:
@@ -64,6 +64,8 @@ func RegisterRoutes(app *fiber.App, cfg *config.Config) {
|
||||
customer.Post("/login", controllers.LoginCustomer)
|
||||
customer.Post("/verify-pin", controllers.VerifyCustomerPin(cfg))
|
||||
customer.Post("/reset-pin", controllers.ResetCustomerPin)
|
||||
customer.Post("/send-email-otp", controllers.SendCustomerEmailOtp(cfg))
|
||||
customer.Post("/verify-email-otp", controllers.VerifyCustomerEmailOtp())
|
||||
|
||||
// Authenticated Customer App routes
|
||||
customerAuth := customer.Use(middlewares.AuthMiddleware(cfg), middlewares.RoleCheckMiddleware(9))
|
||||
@@ -249,6 +251,8 @@ func RegisterRoutes(app *fiber.App, cfg *config.Config) {
|
||||
hubAuth.Get("/bookings/unassigned", controllers.GetHubUnassignedBookings)
|
||||
hubAuth.Get("/inbound/today", controllers.GetHubInboundToday)
|
||||
hubAuth.Post("/bookings/:id/inbound", controllers.CreateInboundScan)
|
||||
hubAuth.Post("/bookings/:id/assign-miler", controllers.HubAssignMiler)
|
||||
hubAuth.Post("/bookings/:id/auto-assign", controllers.HubAutoAssign)
|
||||
hubAuth.Get("/batches", controllers.GetHubBatches)
|
||||
hubAuth.Post("/batches", controllers.CreateHubBatch)
|
||||
hubAuth.Patch("/batches/:id/status", controllers.UpdateBatchStatus)
|
||||
@@ -259,6 +263,16 @@ func RegisterRoutes(app *fiber.App, cfg *config.Config) {
|
||||
hubAuth.Get("/hubs", controllers.GetHubsInCity)
|
||||
hubAuth.Post("/hubs", controllers.CreateCityHub)
|
||||
|
||||
hubAuth.Get("/tripsheets/in-transit", controllers.GetInTransitTripsheets)
|
||||
hubAuth.Get("/inbound/vehicles", controllers.GetInboundVehicles)
|
||||
hubAuth.Get("/activity", controllers.GetHubActivity)
|
||||
hubAuth.Get("/zones", controllers.GetHubZones)
|
||||
hubAuth.Get("/notifications", controllers.GetHubNotifications)
|
||||
hubAuth.Patch("/notifications/:id/read", controllers.MarkNotificationRead)
|
||||
hubAuth.Get("/routing/:trackingno", controllers.GetRoutingInfo)
|
||||
hubAuth.Get("/rider-routes", controllers.GetAllRiderRoutes)
|
||||
hubAuth.Get("/milers/:id/route", controllers.GetMilerRoute)
|
||||
|
||||
// Redis active user caching utilities
|
||||
redisUsers := api.Group("/utils/users/redis")
|
||||
redisUsers.Post("/", controllers.CreateUserRedis)
|
||||
|
||||
Reference in New Issue
Block a user