return if no matches found /2
This commit is contained in:
2
main.go
2
main.go
@@ -166,7 +166,7 @@ func getPlayer(w http.ResponseWriter, r *http.Request) {
|
||||
db.Lock.RLock()
|
||||
tMatches, err := tPlayer.QueryMatches().Order(ent.Desc(match.FieldDate)).Limit(10).All(context.Background())
|
||||
db.Lock.RUnlock()
|
||||
if err != nil {
|
||||
if err != nil || len(tMatches) == 0 {
|
||||
log.Debugf("[GP] No matches found for player %s", id)
|
||||
err := utils.SendJSON(response, w)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user