Deleted utils.GetUser
This commit is contained in:
@ -6,14 +6,13 @@ import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/assets"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
paypalsdk "github.com/logpacker/PayPal-Go-SDK"
|
||||
)
|
||||
|
||||
// CreatePayment creates the PayPal payment, typically via a JSON API route.
|
||||
func CreatePayment(ctx aero.Context) error {
|
||||
// Make sure the user is logged in
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in")
|
||||
|
@ -10,7 +10,6 @@ import (
|
||||
"github.com/animenotifier/notify.moe/arn/stringutils"
|
||||
"github.com/animenotifier/notify.moe/assets"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
const adminID = "4J6qpK1ve"
|
||||
@ -18,7 +17,7 @@ const adminID = "4J6qpK1ve"
|
||||
// Success is called once the payment has been confirmed by the user on the PayPal website.
|
||||
// However, the actual payment still needs to be executed and can fail.
|
||||
func Success(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in")
|
||||
|
Reference in New Issue
Block a user