rider creation

This commit is contained in:
2026-09-04 16:02:47 +05:30
parent e51ad615ed
commit 593b11f1b8
5 changed files with 535 additions and 0 deletions

View File

@@ -17,6 +17,19 @@ func RegisterPartnerRoutes(api fiber.Router, f *facade.Facade) {
partner.Get("/getriderlogs", f.PartnerController.GetRiderLogs)
partner.Get("/getfleetsummary", f.PartnerController.GetFleetSummary)
// Hiring a rider, and the directory that shows them before they clock on.
//
// Until these existed the only way to create a rider was POST /users/create,
// which writes app_users and stops — it answered 201 and produced somebody
// every rider query ignored, because getriders joins ridersettings and
// app_userpools too.
//
// Web group only. A rider is onboarded from the merchant's console, not from
// a phone, so the mobile group below stays read-only as it was.
partner.Post("/createrider", f.PartnerController.CreateRider)
partner.Put("/updaterider", f.PartnerController.UpdateRider)
partner.Get("/getriderroster", f.PartnerController.GetRiderRoster)
partner = api.Group("/v1/mob/partners")
partner.Get("/getpartners", f.PartnerController.GetPartners)