rogueserver/api/daily/rankings.go

19 lines
371 B
Go
Raw Normal View History

package daily
import (
"log"
2024-04-29 12:22:27 -07:00
"github.com/pagefaultgames/rogueserver/db"
"github.com/pagefaultgames/rogueserver/defs"
)
// /daily/rankings - fetch daily rankings
func Rankings(category, page int) ([]defs.DailyRanking, error) {
rankings, err := db.FetchRankings(category, page)
if err != nil {
log.Print("failed to retrieve rankings")
}
return rankings, nil
}