forked from mtusi2026/mtusi2026lab2
fix
This commit is contained in:
@@ -3,6 +3,7 @@ package store
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
@@ -137,7 +138,10 @@ func (s *Store) GetChat(ctx context.Context, chatID, userID string) (model.Chat,
|
||||
).Scan(&c.ID, &c.Title, &c.CreatedAt)
|
||||
|
||||
if err != nil {
|
||||
return model.Chat{}, ErrChatNotFound
|
||||
if errors.Is(err, pgx.ErrNoRows) {
|
||||
return model.Chat{}, ErrChatNotFound
|
||||
}
|
||||
return model.Chat{}, fmt.Errorf("get chat: %w", err)
|
||||
}
|
||||
|
||||
memberIDs, err := s.listChatMemberIDs(ctx, c.ID)
|
||||
|
||||
Reference in New Issue
Block a user