From d1932e2fbde96efaa7cdb045b6b050064f573836 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 23 Nov 2020 11:42:42 +0100 Subject: [PATCH] Fix: Add support for variant in API --- api.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api.go b/api.go index 1bef544..4ad06c5 100644 --- a/api.go +++ b/api.go @@ -99,9 +99,10 @@ func registerAPI(r *mux.Router) { func handleCustomAlert(w http.ResponseWriter, r *http.Request) { var alert struct { - Sound *string `json:"sound"` - Text string `json:"text"` - Title string `json:"title"` + Sound *string `json:"sound"` + Text string `json:"text"` + Title string `json:"title"` + Variant *string `json:"variant"` } if err := json.NewDecoder(r.Body).Decode(&alert); err != nil {