code refactor

This commit is contained in:
2023-12-03 12:12:19 +01:00
parent 70a8d27d22
commit 8c166147b0

View File

@@ -57,6 +57,11 @@ func Login(w http.ResponseWriter, r *http.Request) {
} }
http.SetCookie(w, cookie) http.SetCookie(w, cookie)
if err := json.NewEncoder(w).Encode("ok"); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
} }
func Logout(w http.ResponseWriter, r *http.Request) { func Logout(w http.ResponseWriter, r *http.Request) {