updates on the milerappcontroller and routes allother thing

This commit is contained in:
2026-10-07 12:07:57 +05:30
parent 0326624ca3
commit 6048145377
4 changed files with 130 additions and 6 deletions

View File

@@ -450,12 +450,14 @@ func RegisterRoutes(app *fiber.App, cfg *config.Config) {
adminAuth.Delete("/carrier-pricing/:id", middlewares.DoormileStaffOnly, controllers.DeleteCarrierPricing)
// Pricing
// A client login reads its own rate card (GetPricing is tenant-scoped); every
// change, and the quote (which picks a rule across ALL tenants), is staff-only.
adminAuth.Get("/pricing", controllers.GetPricing)
adminAuth.Post("/pricing", controllers.CreatePricing)
adminAuth.Put("/pricing/:id", controllers.UpdatePricing)
adminAuth.Delete("/pricing/:id", controllers.DeletePricing)
adminAuth.Post("/pricing/simulate", controllers.GetPricingQuoteSimulate)
adminAuth.Post("/pricing/quote", controllers.GetPricingQuoteSimulate)
adminAuth.Post("/pricing", middlewares.DoormileStaffOnly, controllers.CreatePricing)
adminAuth.Put("/pricing/:id", middlewares.DoormileStaffOnly, controllers.UpdatePricing)
adminAuth.Delete("/pricing/:id", middlewares.DoormileStaffOnly, controllers.DeletePricing)
adminAuth.Post("/pricing/simulate", middlewares.DoormileStaffOnly, controllers.GetPricingQuoteSimulate)
adminAuth.Post("/pricing/quote", middlewares.DoormileStaffOnly, controllers.GetPricingQuoteSimulate)
// Doormile pricing bands
adminAuth.Get("/doormile-pricing", controllers.GetDoormilePricing)