Add content-type to API responses

This commit is contained in:
Alexey Khit
2023-05-28 06:37:59 +03:00
parent 1612f9c81e
commit 0e270081fe
7 changed files with 42 additions and 27 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ func apiHandle(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusCreated)
data := fmt.Sprintf(`{"share":%q,"pwd":%q}`, share, pwd)
_, _ = w.Write([]byte(data))
api.ResponseRawJSON(w, data)
case "DELETE":
if ok {