1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: implement diagnostics endpoint (resolve #225)

This commit is contained in:
Ferdinand Mütsch
2021-08-07 10:16:50 +02:00
parent 9e3203ac41
commit 2088987a0c
13 changed files with 843 additions and 536 deletions

View File

@ -72,6 +72,7 @@ func (h *HeartbeatApiHandler) Post(w http.ResponseWriter, r *http.Request) {
if err != nil {
heartbeats, err = h.tryParseSingle(r)
if err != nil {
conf.Log().Request(r).Error(err.Error())
w.WriteHeader(http.StatusBadRequest)
w.Write([]byte(err.Error()))
return