feat: adding/removing users from list now works by email
This commit is contained in:
@@ -78,13 +78,9 @@ func (s *ListService) AddUserToList(ctx context.Context, authUserID string, list
|
||||
return ErrUserIDEmpty
|
||||
}
|
||||
|
||||
inList, err := s.repo.IsUserInList(ctx, listID, authUserID)
|
||||
if err != nil {
|
||||
if err := s.userAllowedToAccessList(ctx, authUserID, listID); err != nil {
|
||||
return err
|
||||
}
|
||||
if !inList {
|
||||
return ErrUserNotInList
|
||||
}
|
||||
|
||||
return s.repo.AddUserToList(ctx, listID, userID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user