Skip to content

Commit

Permalink
feat: make new YSK card in the front (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH authored Aug 19, 2024
1 parent 5e5c9c9 commit e8da20b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions service/ysk.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ func (s *YSKService) YskCardList(ctx context.Context) ([]ysk.YSKCard, error) {
if err != nil {
return []ysk.YSKCard{}, err
}
// reverse card list
// make the latest card be the first one
for i, j := 0, len(cardList)-1; i < j; i, j = i+1, j-1 {
cardList[i], cardList[j] = cardList[j], cardList[i]
}
return cardList, nil
}

Expand Down

0 comments on commit e8da20b

Please sign in to comment.