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

@ -4,14 +4,13 @@ import (
"net/http"
"sort"
"github.com/animenotifier/notify.moe/utils"
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/arn"
)
// Joined shows the most popular joined groups.
func Joined(ctx aero.Context) error {
user := utils.GetUser(ctx)
user := arn.GetUserFromContext(ctx)
if user == nil {
return ctx.Error(http.StatusUnauthorized, "Not logged in")

View File

@ -4,7 +4,6 @@ import (
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/arn"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/utils"
"github.com/animenotifier/notify.moe/utils/infinitescroll"
)
@ -15,7 +14,7 @@ const (
// render renders the groups page with the given groups.
func render(ctx aero.Context, allGroups []*arn.Group) error {
user := utils.GetUser(ctx)
user := arn.GetUserFromContext(ctx)
index, _ := ctx.GetInt("index")
// Slice the part that we need