You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rogueserver/api/daily/rankings.go

24 lines
512 B
Go

package daily
import (
"log"
"github.com/pagefaultgames/pokerogue-server/db"
"github.com/pagefaultgames/pokerogue-server/defs"
)
// /daily/rankings - fetch daily rankings
func Rankings(uuid []byte, category, page int) ([]defs.DailyRanking, error) {
err := db.UpdateAccountLastActivity(uuid)
if err != nil {
log.Print("failed to update account last activity")
}
rankings, err := db.FetchRankings(category, page)
if err != nil {
log.Print("failed to retrieve rankings")
}
return rankings, nil
}