Latest and best soundtrack categories

This commit is contained in:
2017-11-19 17:02:20 +01:00
parent d02cf3fd1c
commit 57273481a6
4 changed files with 83 additions and 8 deletions

View File

@ -12,8 +12,8 @@ import (
const maxTracks = 12
// Get renders the soundtracks page.
func Get(ctx *aero.Context) string {
// Latest renders the soundtracks page.
func Latest(ctx *aero.Context) string {
user := utils.GetUser(ctx)
tracks := arn.FilterSoundTracks(func(track *arn.SoundTrack) bool {
@ -29,8 +29,8 @@ func Get(ctx *aero.Context) string {
return ctx.HTML(components.SoundTracks(tracks, maxTracks, user))
}
// From renders the soundtracks from the given index.
func From(ctx *aero.Context) string {
// LatestFrom renders the soundtracks from the given index.
func LatestFrom(ctx *aero.Context) string {
user := utils.GetUser(ctx)
index, err := ctx.GetInt("index")