From 40f55e8bfb84f985b8c3eea76399cb4b7e9a4e54 Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 16 Dec 2022 11:03:50 +0100 Subject: [PATCH] chore: fix linter --- server/http_handler.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/http_handler.go b/server/http_handler.go index 5e67cde61..275543a3f 100644 --- a/server/http_handler.go +++ b/server/http_handler.go @@ -314,7 +314,11 @@ func targetChargeHandler(loadpoint targetCharger) http.HandlerFunc { // targetChargeRemoveHandler removes target soc func targetChargeRemoveHandler(loadpoint loadpoint.API) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - loadpoint.SetTargetCharge(time.Time{}, 0) + if err := loadpoint.SetTargetCharge(time.Time{}, 0); err != nil { + jsonError(w, http.StatusBadRequest, err) + return + } + res := struct{}{} jsonResult(w, res) }