From a933ac1118abaf158b6da34e4aa280916940586b Mon Sep 17 00:00:00 2001 From: Lakhan Samani Date: Mon, 20 Dec 2021 18:32:36 +0530 Subject: [PATCH] fix: remove count check on cursor --- server/db/user.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server/db/user.go b/server/db/user.go index 606b54f..fa70b57 100644 --- a/server/db/user.go +++ b/server/db/user.go @@ -2,7 +2,6 @@ package db import ( "context" - "errors" "fmt" "log" "time" @@ -199,11 +198,6 @@ func (mgr *manager) GetUserByID(id string) (User, error) { } defer cursor.Close() - count := cursor.Count() - if count == 0 { - return user, errors.New("user not found") - } - for { if !cursor.HasMore() { if user.Key == "" {