1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +02:00

Ensure Backup/Restore process activation keys

This commit is contained in:
McMatts 2018-11-16 19:13:18 +00:00
parent 5153d49ad7
commit 73d91a2dae
3 changed files with 15 additions and 5 deletions

View file

@ -46,6 +46,12 @@ func WriteServerError(w http.ResponseWriter, method string, err error) {
w.Write([]byte("{Error: 'Internal server error'}"))
}
// WriteError notifies HTTP client of general application error.
func WriteError(w http.ResponseWriter, method string) {
writeStatus(w, http.StatusBadRequest)
w.Write([]byte("{Error: 'Internal server error'}"))
}
// WriteDuplicateError notifies HTTP client of duplicate data that has been rejected.
func WriteDuplicateError(w http.ResponseWriter, method, entity string) {
writeStatus(w, http.StatusConflict)