From 9d971871eb407a881b0dcb95d01a65f656750b78 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Sat, 2 Apr 2022 00:45:58 +0300 Subject: [PATCH] Categories: Log category mutations --- categories/handlers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/categories/handlers.go b/categories/handlers.go index 5417efc..0ed1a74 100644 --- a/categories/handlers.go +++ b/categories/handlers.go @@ -52,6 +52,7 @@ func handlerRemoveFromCategory(w http.ResponseWriter, rq *http.Request) { http.Redirect(w, rq, redirectTo, http.StatusSeeOther) return } + log.Println(user.FromRequest(rq).Name, "removed", hyphaName, "from", catName) removeHyphaFromCategory(hyphaName, catName) http.Redirect(w, rq, redirectTo, http.StatusSeeOther) } @@ -72,6 +73,7 @@ func handlerAddToCategory(w http.ResponseWriter, rq *http.Request) { http.Redirect(w, rq, redirectTo, http.StatusSeeOther) return } + log.Println(user.FromRequest(rq).Name, "added", hyphaName, "to", catName) addHyphaToCategory(hyphaName, catName) http.Redirect(w, rq, redirectTo, http.StatusSeeOther) }