Add Current endpoint
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
4e75f15ab3
commit
578b198cb8
2
main.go
2
main.go
|
@ -72,7 +72,7 @@ func runHttpServer() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
http.HandleFunc("/current", func(w http.ResponseWriter, r *http.Request) {
|
http.HandleFunc("/current", func(w http.ResponseWriter, r *http.Request) {
|
||||||
res, err := json.Marshal(currentState)
|
res, err := json.Marshal(lastEvent)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().Err(err).Msg("Cant Marshal Current State")
|
log.Fatal().Err(err).Msg("Cant Marshal Current State")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue