forked from mtusi2026/mtusi2026lab4
refactor(db): use int for attachment size and add lookup query
This commit is contained in:
@@ -143,7 +143,7 @@ func (s *ChatService) List(
|
||||
if cursor == nil {
|
||||
rows, err := s.q.ListChatsFirstPage(ctx, db.ListChatsFirstPageParams{
|
||||
UserID: userID,
|
||||
Lim: int32(limit + 1),
|
||||
Lim: limit + 1,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
@@ -168,7 +168,7 @@ func (s *ChatService) List(
|
||||
UserID: userID,
|
||||
AfterCreatedAt: decoded.CreatedAt,
|
||||
AfterID: decoded.ID,
|
||||
Lim: int32(limit + 1),
|
||||
Lim: limit + 1,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
||||
Reference in New Issue
Block a user