Deleted utils.GetUser

This commit is contained in:
2019-11-17 16:59:34 +09:00
parent ad9870b1c1
commit daed4146ed
117 changed files with 178 additions and 271 deletions

View File

@ -5,7 +5,7 @@ import (
"github.com/aerogo/aero"
"github.com/aerogo/log"
"github.com/animenotifier/notify.moe/utils"
"github.com/animenotifier/notify.moe/arn"
)
// Logout is called when the user clicks the logout button.
@ -13,7 +13,7 @@ import (
func Logout(app *aero.Application, authLog *log.Log) {
app.Get("/logout", func(ctx aero.Context) error {
if ctx.HasSession() {
user := utils.GetUser(ctx)
user := arn.GetUserFromContext(ctx)
if user != nil {
authLog.Info("%s logged out | %s | %s | %s | %s", user.Nick, user.ID, ctx.IP(), user.Email, user.RealName())