guide changes
This commit is contained in:
@@ -22,6 +22,37 @@ func RegisterTenantRoutes(api fiber.Router, f *facade.Facade) {
|
||||
tenant.Put("/updatetenantlocation", f.TenantController.UpdateTenantLocation)
|
||||
tenant.Post("/createtenantuser", f.TenantController.CreateTenantUser)
|
||||
|
||||
// One business, by id.
|
||||
//
|
||||
// Also /mob-only until now, so the console's only way to read its own
|
||||
// merchant was `getalltenants` — 262 rows, paginated, and a shop on page
|
||||
// two was simply not found. A profile screen cannot be built on that.
|
||||
tenant.Get("/gettenantinfo", f.TenantController.GetTenantInfo)
|
||||
|
||||
// A merchant editing their own business record. The first write path the
|
||||
// `tenants` table has ever had — see UpdateTenantProfile for what may be
|
||||
// set, and what deliberately may not.
|
||||
tenant.Put("/updatetenant", f.TenantController.UpdateTenantProfile)
|
||||
|
||||
// Somebody editing their own name, mobile or email. Scoped to their own
|
||||
// account AND their own business — `users/update` checks neither, which is
|
||||
// why the store user's account page could only ever be read-only.
|
||||
tenant.Put("/updateownprofile", f.TenantController.UpdateOwnProfile)
|
||||
|
||||
// A merchant's people, and where each of them works.
|
||||
//
|
||||
// These existed only under /mob, which is why the console has never had a
|
||||
// screen for them: back-office staff were reachable exclusively through the
|
||||
// customer app's door. The /mob registrations stay — something may be
|
||||
// calling them — but this is where they belong.
|
||||
tenant.Get("/getstaffs", f.TenantController.GetStaffs)
|
||||
tenant.Post("/createstaff", f.TenantController.CreateStaff)
|
||||
|
||||
// Placing a person at a branch, or taking them off one. Separate from
|
||||
// createstaff because hiring and posting are different decisions, and the
|
||||
// second happens repeatedly over an account's life.
|
||||
tenant.Put("/assignstaff", f.TenantController.AssignStaff)
|
||||
|
||||
tenant = api.Group("/v1/mob/tenants")
|
||||
|
||||
tenant.Get("/gettenantslot", f.TenantController.GetTenantSlot)
|
||||
@@ -34,6 +65,11 @@ func RegisterTenantRoutes(api fiber.Router, f *facade.Facade) {
|
||||
tenant.Post("/createlocation", f.TenantController.CreateLocation)
|
||||
tenant.Get("/getstaffs", f.TenantController.GetStaffs)
|
||||
tenant.Post("/createstaff", f.TenantController.CreateStaff)
|
||||
|
||||
// Placing a person at a branch, or taking them off one. Separate from
|
||||
// createstaff because hiring and posting are different decisions, and the
|
||||
// second happens again and again over an account's life.
|
||||
tenant.Put("/assignstaff", f.TenantController.AssignStaff)
|
||||
tenant.Post("/createtenantuser", f.TenantController.CreateTenantUser)
|
||||
tenant.Get("/gettenantinfo", f.TenantController.GetTenantInfo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user