api for health score toggle

This commit is contained in:
2026-10-05 12:07:49 +05:30
parent 97f277f424
commit fc2caffcd1
7 changed files with 358 additions and 1 deletions

View File

@@ -28,6 +28,14 @@ func RegisterProductRoutes(api fiber.Router, f *facade.Facade) {
products.Put("/updateproductlocation", f.ProductController.UpdateProductLocation)
products.Post("/createproductlocation", f.ProductController.CreateProductLocation)
products.Post("/importcatalogueproduct", f.ProductController.ImportCatalogueProduct)
// Whether this shop shows a product's health score.
//
// On `/v1/web` only. The merchant decides for their own shelf, so it needs
// the session that says which shelf is theirs — and the mobile group has no
// guard at all, which would make this "anyone can turn any shop's health
// scores off".
products.Put("/showhealthscore", f.ProductController.SetShowHealthScore)
products.Get("/getimportedcatalogueproducts", f.ProductController.GetImportedCatalogueProducts)
// Repairing catalogue links. A dry run unless `apply=true` — see the handler,