Cleanup
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package popularanime
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
@ -8,29 +10,10 @@ import (
|
||||
|
||||
// Get search page.
|
||||
func Get(ctx *aero.Context) string {
|
||||
// titleCount := 0
|
||||
// animeCount := 0
|
||||
|
||||
// // let info: any = await bluebird.props({
|
||||
// // popular: arn.db.get('Cache', 'popularAnime'),
|
||||
// // stats: arn.db.get('Cache', 'animeStats')
|
||||
// // })
|
||||
|
||||
// // return response.render({
|
||||
// // user,
|
||||
// // popularAnime: info.popular.anime,
|
||||
// // animeCount: info.stats.animeCount,
|
||||
// // titleCount: info.stats.titleCount,
|
||||
// // anime: null
|
||||
// // })
|
||||
|
||||
// popular, _ := arn.GetPopularCache()
|
||||
|
||||
// return ctx.HTML(components.Search(popular.Anime, titleCount, animeCount))
|
||||
animeList, err := arn.GetPopularAnimeCached()
|
||||
|
||||
if err != nil {
|
||||
return ctx.HTML("There was a problem listing anime!")
|
||||
return ctx.Error(http.StatusInternalServerError, "Error fetching popular anime", err)
|
||||
}
|
||||
|
||||
return ctx.HTML(components.AnimeGrid(animeList))
|
||||
|
Reference in New Issue
Block a user