Logging for inner circle

face-detect
Noah Petherbridge 2023-05-23 20:32:51 -07:00
parent 3b3616f0c9
commit 081a22a6ef
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package account
import (
"net/http"
"code.nonshy.com/nonshy/website/pkg/log"
"code.nonshy.com/nonshy/website/pkg/models"
"code.nonshy.com/nonshy/website/pkg/session"
"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)
}
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)
templates.Redirect(w, "/photo/u/"+user.Username)
return