Response to saving with something
This commit is contained in:
parent
857d1416f6
commit
3747a18b71
|
@ -54,7 +54,7 @@ func (s *server) fieldsHandler(w http.ResponseWriter, req *http.Request) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Add("Content-Type", "application/json; charset=utf8")
|
w.Header().Add("Content-Type", "application/json; charset=utf-8")
|
||||||
w.Write(jsn)
|
w.Write(jsn)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,4 +64,8 @@ func (s *server) saveHandler(w http.ResponseWriter, req *http.Request) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
s.manager.importJson(b)
|
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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue