Add Current endpoint
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kekskurse 2022-01-14 22:50:03 +01:00
parent 4e75f15ab3
commit 578b198cb8
Signed by: kekskurse
GPG key ID: 728ACCB59341E7E4

View file

@ -72,7 +72,7 @@ func runHttpServer() {
}
})
http.HandleFunc("/current", func(w http.ResponseWriter, r *http.Request) {
res, err := json.Marshal(currentState)
res, err := json.Marshal(lastEvent)
if err != nil {
log.Fatal().Err(err).Msg("Cant Marshal Current State")
}