From 481be667dba417ce1812e75a62b9e606bcf9ed99 Mon Sep 17 00:00:00 2001 From: abhishek Date: Fri, 31 Jul 2026 12:48:36 +0530 Subject: [PATCH] Register the rider push-notification route MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /utils/notifyuser has been commented out since the initial commit, so every rider push the admin consoles have ever sent returned 404. Riders were assigned deliveries and never told, and the failure surfaced as a generic "notification failed" that read like a transient network fault. Nothing else was missing. The handler, the FcmNotification model, the Firebase service account and the Dockerfile line that copies that account into the image were all already in place — only the route registration was absent, which is why the gap survived this long. Verified against Google: with the route registered, FCM authenticates the service account and returns a specific rejection for a deliberately invalid token rather than a 404. No push was sent to a real rider, so the final hop to a device is still unproven. Co-Authored-By: Claude Opus 5 --- routes/utilsroutes.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routes/utilsroutes.go b/routes/utilsroutes.go index fe20429..5ebeaa1 100644 --- a/routes/utilsroutes.go +++ b/routes/utilsroutes.go @@ -11,7 +11,12 @@ func RegisterUtilsRoutes(api fiber.Router, f *facade.Facade) { utils := api.Group("/v1/web/utils") utils.Get("/getapptypes", f.UtilsController.GetAppTypes) - // utils.Post("/notifyuser", f.UtilsController.NotifyUser) + // Commented out since the initial commit, which meant every rider push the + // admin console has ever sent returned 404 — riders were assigned deliveries + // and never told. The handler, the FcmNotification model, the Firebase + // service account and the Dockerfile COPY that puts it in the image were all + // already in place; only the route was missing. + utils.Post("/notifyuser", f.UtilsController.NotifyUser) utils.Get("/getsubcategories", f.UtilsController.GetSubcategories) utils.Get("/getapplocations", f.UtilsController.GetApplocations) utils.Get("/getappcategories", f.UtilsController.GetAppCategory)