| commit | 493dd48d28a16bf5abd11f0ab55a1020764f994f | [log] [tgz] |
|---|---|---|
| author | iomodo <wineson@gmail.com> | Fri Apr 02 00:07:51 2021 +0400 |
| committer | iomodo <wineson@gmail.com> | Fri Apr 02 00:07:51 2021 +0400 |
| tree | 8d6bc2b3bf04baedd4d060ff9f6bb74898ae4b62 | |
| parent | 8e28a6a3809c592b3d4fd7fb6ac29e9d1eb608ef [diff] [blame] |
Move password hashing in handler
diff --git a/core/kg/api/rest/handler.go b/core/kg/api/rest/handler.go index dbc5882..88d0670 100644 --- a/core/kg/api/rest/handler.go +++ b/core/kg/api/rest/handler.go
@@ -23,9 +23,7 @@ return err } - if statusCode != http.StatusOK { - w.WriteHeader(statusCode) - } + w.WriteHeader(statusCode) encoder := json.NewEncoder(w) encoder.SetEscapeHTML(true) @@ -35,9 +33,5 @@ return err } - if f, ok := w.(http.Flusher); ok { - f.Flush() - } - return nil }