1
0
Fork 0

Response to saving with something

This commit is contained in:
Gregory Eremin 2015-01-25 19:33:46 +07:00
parent 857d1416f6
commit 3747a18b71
1 changed files with 5 additions and 1 deletions

View File

@ -54,7 +54,7 @@ func (s *server) fieldsHandler(w http.ResponseWriter, req *http.Request) {
panic(err)
}
w.Header().Add("Content-Type", "application/json; charset=utf8")
w.Header().Add("Content-Type", "application/json; charset=utf-8")
w.Write(jsn)
}
@ -64,4 +64,8 @@ func (s *server) saveHandler(w http.ResponseWriter, req *http.Request) {
panic(err)
}
s.manager.importJson(b)
jsn, _ := json.Marshal(map[string]bool{"success": true})
w.Header().Add("Content-Type", "application/json; charset=utf-8")
w.Write(jsn)
}