From b6cda91dd959d43df73cf062cb80fec0625643d8 Mon Sep 17 00:00:00 2001 From: Umputun Date: Tue, 10 Jul 2018 02:02:17 -0500 Subject: [PATCH] invalidate user_id scope on vote change #151 --- backend/app/rest/api/rest_private.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/rest/api/rest_private.go b/backend/app/rest/api/rest_private.go index e6445583..74c17fb6 100644 --- a/backend/app/rest/api/rest_private.go +++ b/backend/app/rest/api/rest_private.go @@ -172,7 +172,7 @@ func (s *Rest) voteCtrl(w http.ResponseWriter, r *http.Request) { rest.SendErrorJSON(w, r, http.StatusBadRequest, err, "can't vote for comment") return } - s.Cache.Flush(locator.URL) + s.Cache.Flush(locator.URL, comment.User.ID) render.JSON(w, r, JSON{"id": comment.ID, "score": comment.Score}) }