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
arn
auth
middleware
mixins
pages
activity
admin
amv
amvs
anime
animeimport
animelist
animelistitem
calendar
character
characters
charge
companies
company
compare
editlog
editor
embed
episode
explore
explore.go
explorecolor
explorerelations
halloffame
genre
genres
group
groups
home
inventory
listimport
listimport.go
listimportanilist
listimportkitsu
listimportmyanimelist
me
newthread
notifications
paypal
post
profile
quote
quotes
recommended
search
settings
shop
soundtrack
soundtracks
sse
support
thread
upload
user
welcome
utils

@ -5,13 +5,12 @@ import (
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/arn"
"github.com/animenotifier/notify.moe/utils"
)
// Get settings.
func Get(component func(*arn.User) string) func(aero.Context) error {
return func(ctx aero.Context) error {
user := utils.GetUser(ctx)
user := arn.GetUserFromContext(ctx)
if user == nil {
return ctx.Error(http.StatusUnauthorized, "Not logged in")