Deleted utils.GetUser
This commit is contained in:
@ -4,13 +4,13 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Get ...
|
||||
func Get(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusBadRequest, "Not logged in")
|
||||
|
@ -10,12 +10,11 @@ import (
|
||||
"github.com/animenotifier/anilist"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Preview shows an import preview.
|
||||
func Preview(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusBadRequest, "Not logged in")
|
||||
@ -32,7 +31,7 @@ func Preview(ctx aero.Context) error {
|
||||
|
||||
// Finish ...
|
||||
func Finish(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusBadRequest, "Not logged in")
|
||||
@ -74,7 +73,7 @@ func Finish(ctx aero.Context) error {
|
||||
|
||||
// getMatches finds and returns all matches for the logged in user.
|
||||
func getMatches(ctx aero.Context) ([]*arn.AniListMatch, error) {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return nil, errors.New("Not logged in")
|
||||
|
@ -9,12 +9,11 @@ import (
|
||||
"github.com/animenotifier/kitsu"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Preview shows an import preview.
|
||||
func Preview(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusBadRequest, "Not logged in")
|
||||
@ -31,7 +30,7 @@ func Preview(ctx aero.Context) error {
|
||||
|
||||
// Finish ...
|
||||
func Finish(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusBadRequest, "Not logged in")
|
||||
@ -85,7 +84,7 @@ func Finish(ctx aero.Context) error {
|
||||
|
||||
// getMatches finds and returns all matches for the logged in user.
|
||||
func getMatches(ctx aero.Context) ([]*arn.KitsuMatch, error) {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return nil, errors.New("Not logged in")
|
||||
|
@ -10,12 +10,11 @@ import (
|
||||
"github.com/animenotifier/mal"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Preview shows an import preview.
|
||||
func Preview(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusBadRequest, "Not logged in")
|
||||
@ -32,7 +31,7 @@ func Preview(ctx aero.Context) error {
|
||||
|
||||
// Finish ...
|
||||
func Finish(ctx aero.Context) error {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusBadRequest, "Not logged in")
|
||||
@ -79,7 +78,7 @@ func Finish(ctx aero.Context) error {
|
||||
|
||||
// getMatches finds and returns all matches for the logged in user.
|
||||
func getMatches(ctx aero.Context) ([]*arn.MyAnimeListMatch, error) {
|
||||
user := utils.GetUser(ctx)
|
||||
user := arn.GetUserFromContext(ctx)
|
||||
|
||||
if user == nil {
|
||||
return nil, errors.New("Not logged in")
|
||||
|
Reference in New Issue
Block a user