Starting with a fresh database

This commit is contained in:
2017-06-02 16:17:58 +02:00
parent a762b7bec1
commit 13c87d65d8
7 changed files with 170 additions and 117 deletions

View File

@ -2,29 +2,28 @@ package search
import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// Get ...
func Get(ctx *aero.Context) string {
titleCount := 0
animeCount := 0
// titleCount := 0
// animeCount := 0
// let info: any = await bluebird.props({
// popular: arn.db.get('Cache', 'popularAnime'),
// stats: arn.db.get('Cache', 'animeStats')
// })
// // 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
// })
// // return response.render({
// // user,
// // popularAnime: info.popular.anime,
// // animeCount: info.stats.animeCount,
// // titleCount: info.stats.titleCount,
// // anime: null
// // })
popular, _ := arn.GetPopularCache()
// popular, _ := arn.GetPopularCache()
return ctx.HTML(components.Search(popular.Anime, titleCount, animeCount))
// return ctx.HTML(components.Search(popular.Anime, titleCount, animeCount))
return ctx.HTML("Coming soon.")
}