Logging for inner circle

This commit is contained in:
Noah Petherbridge 2023-05-23 20:32:51 -07:00
parent 3b3616f0c9
commit 081a22a6ef

View File

@ -3,6 +3,7 @@ package account
import ( import (
"net/http" "net/http"
"code.nonshy.com/nonshy/website/pkg/log"
"code.nonshy.com/nonshy/website/pkg/models" "code.nonshy.com/nonshy/website/pkg/models"
"code.nonshy.com/nonshy/website/pkg/session" "code.nonshy.com/nonshy/website/pkg/session"
"code.nonshy.com/nonshy/website/pkg/templates" "code.nonshy.com/nonshy/website/pkg/templates"
@ -72,6 +73,8 @@ func InviteCircle() http.HandlerFunc {
session.FlashError(w, r, "Couldn't add to the inner circle: %s", err) session.FlashError(w, r, "Couldn't add to the inner circle: %s", err)
} }
log.Info("InnerCircle: %s adds %s to the inner circle", currentUser.Username, user.Username)
session.Flash(w, r, "%s has been added to the inner circle!", user.Username) session.Flash(w, r, "%s has been added to the inner circle!", user.Username)
templates.Redirect(w, "/photo/u/"+user.Username) templates.Redirect(w, "/photo/u/"+user.Username)
return return