all repos — privychka @ 19136a998584874810c21b651bcb91d2815932f7

habit tracking service

Return after writing response
Anirudh Oppiliappan x@icyphox.sh
Wed, 29 Dec 2021 20:12:47 +0530
commit

19136a998584874810c21b651bcb91d2815932f7

parent

781f26ac38324da74a9fe59c0d37f603b7f8eca8

1 files changed, 2 insertions(+), 0 deletions(-)

jump to
M main.gomain.go

@@ -81,6 +81,7 @@ key := getKey(r)

if secretKey != key { log.Printf("incorrect key: %v\n", key) w.WriteHeader(401) + return } json.NewDecoder(r.Body).Decode(&h) log.Printf(h.String())

@@ -88,6 +89,7 @@

if err := h.WriteTSV(hFile); err != nil { log.Printf("error: %v\n", err) w.WriteHeader(500) + return } w.WriteHeader(204) })