From f8f5aefff9713b46b6f86c2dfefe76f188083142 Mon Sep 17 00:00:00 2001 From: maru Date: Tue, 21 May 2024 01:45:03 -0400 Subject: [PATCH] Better logging --- api/daily/rankings.go | 4 +--- api/daily/rankingspagecount.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/api/daily/rankings.go b/api/daily/rankings.go index b3ac2b6..a54c0a0 100644 --- a/api/daily/rankings.go +++ b/api/daily/rankings.go @@ -18,8 +18,6 @@ package daily import ( - "log" - "github.com/pagefaultgames/rogueserver/db" "github.com/pagefaultgames/rogueserver/defs" ) @@ -28,7 +26,7 @@ import ( 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, err } return rankings, nil diff --git a/api/daily/rankingspagecount.go b/api/daily/rankingspagecount.go index 458cbd6..32b0e65 100644 --- a/api/daily/rankingspagecount.go +++ b/api/daily/rankingspagecount.go @@ -18,8 +18,6 @@ package daily import ( - "log" - "github.com/pagefaultgames/rogueserver/db" ) @@ -27,7 +25,7 @@ import ( func RankingPageCount(category int) (int, error) { pageCount, err := db.FetchRankingPageCount(category) if err != nil { - log.Print("failed to retrieve ranking page count") + return pageCount, err } return pageCount, nil