From 904bc11c092a3625f4a4c8a22187ae24dc47bf3f Mon Sep 17 00:00:00 2001 From: Umputun Date: Sat, 27 Oct 2018 13:20:50 -0500 Subject: [PATCH] add lastCommentsScope to blocking rest --- backend/app/rest/api/admin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/rest/api/admin.go b/backend/app/rest/api/admin.go index 7cd8ad2e..1913d45a 100644 --- a/backend/app/rest/api/admin.go +++ b/backend/app/rest/api/admin.go @@ -74,7 +74,7 @@ func (a *admin) deleteUserCtrl(w http.ResponseWriter, r *http.Request) { rest.SendErrorJSON(w, r, http.StatusInternalServerError, err, "can't delete user") return } - a.cache.Flush(cache.Flusher(siteID).Scopes(userID, siteID)) + a.cache.Flush(cache.Flusher(siteID).Scopes(userID, siteID, lastCommentsScope)) render.Status(r, http.StatusOK) render.JSON(w, r, JSON{"user_id": userID, "site_id": siteID}) } @@ -149,7 +149,7 @@ func (a *admin) setBlockCtrl(w http.ResponseWriter, r *http.Request) { rest.SendErrorJSON(w, r, http.StatusBadRequest, err, "can't set blocking status") return } - a.cache.Flush(cache.Flusher(siteID).Scopes(userID, siteID)) + a.cache.Flush(cache.Flusher(siteID).Scopes(userID, siteID, lastCommentsScope)) render.JSON(w, r, JSON{"user_id": userID, "site_id": siteID, "block": blockStatus}) }