Implemented new frontpage
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
package home
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"github.com/animenotifier/arn"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/pages/frontpage"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
@ -17,15 +16,5 @@ func Get(ctx *aero.Context) string {
|
||||
return frontpage.Get(ctx)
|
||||
}
|
||||
|
||||
viewUser := user
|
||||
animeList := viewUser.AnimeList()
|
||||
|
||||
if animeList == nil {
|
||||
return ctx.Error(http.StatusNotFound, "Anime list not found", nil)
|
||||
}
|
||||
|
||||
animeList.PrefetchAnime()
|
||||
animeList.Sort()
|
||||
|
||||
return ctx.HTML(components.Home(animeList.Watching(), animeList.User(), user, "watching"))
|
||||
return AnimeList(ctx, user, arn.AnimeListStatusWatching)
|
||||
}
|
||||
|
Reference in New Issue
Block a user