Log FCM env value on test-push requests.

Add request-time logging in the test push endpoint so FCM_SERVICE_ACCOUNT_KEY can be verified during each API call, not only at service startup.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Yared Yemane 2026-05-11 09:56:45 -07:00
parent 75353f8bdd
commit cd0ae19d03

View File

@ -727,6 +727,9 @@ func (h *Handler) RegisterDeviceToken(c *fiber.Ctx) error {
func (h *Handler) SendTestPushNotification(c *fiber.Ctx) error {
title := c.FormValue("title", "Test Push Notification")
message := c.FormValue("message", "This is a test push notification from Yimaru Backend")
h.mongoLoggerSvc.Info("FCM_SERVICE_ACCOUNT_KEY value during test-push call",
zap.String("fcm_service_account_key", h.Cfg.FCMServiceAccountKey),
)
userID, ok := c.Locals("user_id").(int64)
if !ok || userID == 0 {