API Cleanup

This commit is contained in:
2017-11-18 11:37:29 +01:00
parent bd293de4be
commit c5cb497722
7 changed files with 37 additions and 31 deletions

View File

@ -72,7 +72,7 @@ func Get(ctx *aero.Context) string {
}
// Soundtracks
tracks, err := arn.FilterSoundTracks(func(track *arn.SoundTrack) bool {
tracks := arn.FilterSoundTracks(func(track *arn.SoundTrack) bool {
return !track.IsDraft && len(track.Media) > 0 && arn.Contains(track.Tags, "anime:"+anime.ID)
})
@ -80,10 +80,6 @@ func Get(ctx *aero.Context) string {
return tracks[i].Title < tracks[j].Title
})
if err != nil {
return ctx.Error(http.StatusNotFound, "Error fetching soundtracks", err)
}
// Open Graph
description := anime.Summary