rename loc in response to locator

This commit is contained in:
Umputun
2018-01-28 16:22:03 -06:00
parent a0632c89f8
commit de2188f1a6
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ func (a *admin) setPinCtrl(w http.ResponseWriter, r *http.Request) {
return
}
a.cache.Flush()
render.JSON(w, r, JSON{"id": commentID, "loc": locator, "pin": pinStatus})
render.JSON(w, r, JSON{"id": commentID, "locator": locator, "pin": pinStatus})
}
// GET /export?site=site-id?mode=file|stream
+2 -2
View File
@@ -159,7 +159,7 @@ func (s *Server) createCommentCtrl(w http.ResponseWriter, r *http.Request) {
s.Cache.Flush() // reset all caches
render.Status(r, http.StatusCreated)
render.JSON(w, r, JSON{"id": id, "loc": comment.Locator})
render.JSON(w, r, JSON{"id": id, "locator": comment.Locator})
}
// PUT /comment/{id}?site=siteID&url=post-url - update comment
@@ -330,7 +330,7 @@ func (s *Server) countCtrl(w http.ResponseWriter, r *http.Request) {
common.SendErrorJSON(w, r, http.StatusBadRequest, err, "can't get count")
return
}
render.JSON(w, r, JSON{"count": count, "loc": locator})
render.JSON(w, r, JSON{"count": count, "locator": locator})
}
// GET /list?site=siteID - list posts with comments