Skip to content

Commit a933ac1

Browse files
committed
fix: remove count check on cursor
1 parent bedc3d0 commit a933ac1

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

server/db/user.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package db
22

33
import (
44
"context"
5-
"errors"
65
"fmt"
76
"log"
87
"time"
@@ -199,11 +198,6 @@ func (mgr *manager) GetUserByID(id string) (User, error) {
199198
}
200199
defer cursor.Close()
201200

202-
count := cursor.Count()
203-
if count == 0 {
204-
return user, errors.New("user not found")
205-
}
206-
207201
for {
208202
if !cursor.HasMore() {
209203
if user.Key == "" {

0 commit comments

Comments
 (0)