From 314b3c50677d874c009a42191a82ca03924abd07 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Tue, 16 Nov 2021 14:05:22 +0100 Subject: [PATCH] don't return player not found --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 91bfb49..a8a8c58 100644 --- a/main.go +++ b/main.go @@ -289,7 +289,7 @@ func getPlayer(w http.ResponseWriter, r *http.Request) { } tPlayer, err := utils.Player(db, id, conf.Steam.APIKey, nil) - if err != nil { + if err != nil || tPlayer == nil { log.Infof("[GP] Player not found: %+v", err) w.WriteHeader(http.StatusNotFound) return