[Gekidou] Add push notification check to ping (#19610)

* Add push notification check to ping

* Add test type and missing details

* Address feedback

* Fix function name

* Address feedback

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Daniel Espino García
2022-03-02 12:15:58 +01:00
коммит произвёл GitHub
родитель 7e2ae93231
Коммит 32e3c2f0b8
7 изменённых файлов: 131 добавлений и 29 удалений

Просмотреть файл

@@ -183,6 +183,10 @@ func getSystemPing(c *Context, w http.ResponseWriter, r *http.Request) {
w.Header().Set(filestoreStatusKey, s[filestoreStatusKey])
}
if deviceID := r.FormValue("device_id"); deviceID != "" {
s["CanReceiveNotifications"] = c.App.SendTestPushNotification(deviceID)
}
if s[model.STATUS] != model.StatusOk {
w.WriteHeader(http.StatusInternalServerError)
}