mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-10 22:17:44 +00:00
change notification title
This commit is contained in:
parent
e39693d47b
commit
8723bf6c5c
1 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,8 @@ import (
|
||||||
"github.com/christianselig/apollo-backend/internal/data"
|
"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) {
|
func (a *api) upsertDeviceHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
|
||||||
d := &data.Device{}
|
d := &data.Device{}
|
||||||
if err := json.NewDecoder(r.Body).Decode(d); err != nil {
|
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.
|
notification.Payload = payload.
|
||||||
NewPayload().
|
NewPayload().
|
||||||
Category("test-notification").
|
Category("test-notification").
|
||||||
AlertTitle("Test notification").
|
AlertTitle(notificationTitle).
|
||||||
AlertBody(body)
|
AlertBody(body)
|
||||||
|
|
||||||
client := apns2.NewTokenClient(a.apns)
|
client := apns2.NewTokenClient(a.apns)
|
||||||
|
|
Loading…
Reference in a new issue