Refactor to use aerogo/database

This commit is contained in:
2017-10-27 09:11:56 +02:00
parent c0d7b0d2df
commit b07a98ed32
18 changed files with 52 additions and 164 deletions

View File

@ -1,7 +1,6 @@
package editor
import (
"net/http"
"sort"
"github.com/aerogo/aero"
@ -13,14 +12,10 @@ const maxAniListEntries = 70
// AniList ...
func AniList(ctx *aero.Context) string {
missing, err := arn.FilterAnime(func(anime *arn.Anime) bool {
missing := arn.FilterAnime(func(anime *arn.Anime) bool {
return anime.GetMapping("anilist/anime") == ""
})
if err != nil {
ctx.Error(http.StatusInternalServerError, "Couldn't filter anime", err)
}
sort.Slice(missing, func(i, j int) bool {
a := missing[i]
b := missing[j]