Deleted utils.GetUser
This commit is contained in:
@ -6,7 +6,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/editform"
|
||||
)
|
||||
|
||||
@ -14,7 +13,7 @@ import (
|
||||
func Edit(ctx aero.Context) error {
|
||||
id := ctx.Get("id")
|
||||
group, err := arn.GetGroup(id)
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if err != nil {
|
||||
return ctx.Error(http.StatusNotFound, "Group not found", err)
|
||||
@ -33,7 +32,7 @@ func Edit(ctx aero.Context) error {
|
||||
func EditImage(ctx aero.Context) error {
|
||||
id := ctx.Get("id")
|
||||
group, err := arn.GetGroup(id)
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if err != nil {
|
||||
return ctx.Error(http.StatusNotFound, "Group not found", err)
|
||||
|
@ -7,12 +7,11 @@ import (
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/middleware"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Feed shows the group front page.
|
||||
func Feed(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
id := ctx.Get("id")
|
||||
group, err := arn.GetGroup(id)
|
||||
|
||||
|
@ -7,12 +7,11 @@ import (
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/middleware"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Info shows the group information page.
|
||||
func Info(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
id := ctx.Get("id")
|
||||
group, err := arn.GetGroup(id)
|
||||
|
||||
|
@ -7,12 +7,11 @@ import (
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/middleware"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Members shows the group members.
|
||||
func Members(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
id := ctx.Get("id")
|
||||
group, err := arn.GetGroup(id)
|
||||
|
||||
|
Reference in New Issue
Block a user