From 8723bf6c5c65c12045826b3a5b4d27168d6a407b Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Mon, 26 Jul 2021 13:42:16 -0400 Subject: [PATCH] change notification title --- internal/api/devices.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/api/devices.go b/internal/api/devices.go index 0e9d36f..851296e 100644 --- a/internal/api/devices.go +++ b/internal/api/devices.go @@ -15,6 +15,8 @@ import ( "github.com/christianselig/apollo-backend/internal/data" ) +const notificationTitle = "📣 Hello, is this thing on?" + func (a *api) upsertDeviceHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { d := &data.Device{} if err := json.NewDecoder(r.Body).Decode(d); err != nil { @@ -72,7 +74,7 @@ func (a *api) testDeviceHandler(w http.ResponseWriter, r *http.Request, ps httpr notification.Payload = payload. NewPayload(). Category("test-notification"). - AlertTitle("Test notification"). + AlertTitle(notificationTitle). AlertBody(body) client := apns2.NewTokenClient(a.apns)