fix: remove count check on cursor

This commit is contained in:
Lakhan Samani 2021-12-20 18:32:36 +05:30
parent bedc3d0b50
commit a933ac1118

View File

@ -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 == "" {