Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
✨ Added query parameter to sort animelist items.
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulcramer authored and soulcramer committed Sep 30, 2018
1 parent 364a6c2 commit 9482167
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/animelist/animelist.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func FilterByStatus(status string) aero.Handle {
func AnimeList(ctx *aero.Context, user *arn.User, status string) string {
nick := ctx.Get("nick")
index, _ := ctx.GetInt("index")
sort := ctx.Query("sort")
viewUser, err := arn.GetUserByNick(nick)

if err != nil {
Expand All @@ -49,7 +50,7 @@ func AnimeList(ctx *aero.Context, user *arn.User, status string) string {
}

// Sort the items
statusList.Sort()
statusList.SortByAlgo(sort, user)

// These are all animer list items for the given status
allItems := statusList.Items
Expand Down

0 comments on commit 9482167

Please sign in to comment.