api: standardise marshal and unmarshal fn names

This commit is contained in:
Adhityaa Chandrasekar
2018-07-24 12:28:43 +05:30
parent 9974365b73
commit a8ecbd9717
23 changed files with 127 additions and 127 deletions

View File

@@ -29,9 +29,9 @@ func commenterTokenNew() (string, error) {
func commenterTokenNewHandler(w http.ResponseWriter, r *http.Request) {
commenterToken, err := commenterTokenNew()
if err != nil {
writeBody(w, response{"success": false, "message": err.Error()})
bodyMarshal(w, response{"success": false, "message": err.Error()})
return
}
writeBody(w, response{"success": true, "commenterToken": commenterToken})
bodyMarshal(w, response{"success": true, "commenterToken": commenterToken})
}