Skip to content

Commit

Permalink
fix missing OrganizationNotFoundError
Browse files Browse the repository at this point in the history
  • Loading branch information
hofstede-matheus committed Oct 12, 2023
1 parent cb463c2 commit 8823405
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export class FindOneOrAllOrganizationsUsecase implements UseCase {
userId,
});

if (!organizations) return left(new OrganizationNotFoundError());
if (organizations.length === 0)
return left(new OrganizationNotFoundError());

if (!userId) {
return right([
Expand Down

0 comments on commit 8823405

Please sign in to comment.