Добавить сессии в Valkey и вход через Basic с Bearer-токеном
This commit is contained in:
@@ -68,16 +68,6 @@ func (s *Service) GetByID(ctx context.Context, id uuid.UUID) (User, error) {
|
||||
return s.repo.GetByID(ctx, id)
|
||||
}
|
||||
|
||||
// Exists serves the identification middleware; it is the single-id form of
|
||||
// ExistingIDs so existence is answered by one code path.
|
||||
func (s *Service) Exists(ctx context.Context, id uuid.UUID) (bool, error) {
|
||||
found, err := s.ExistingIDs(ctx, []uuid.UUID{id})
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return len(found) == 1, nil
|
||||
}
|
||||
|
||||
// ExistingIDs serves the chats module when it validates member lists.
|
||||
func (s *Service) ExistingIDs(ctx context.Context, ids []uuid.UUID) ([]uuid.UUID, error) {
|
||||
if len(ids) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user