diff --git a/src/modules/organizations/interactors/usecases/FindOneOrAllOrganizationsUsecase.ts b/src/modules/organizations/interactors/usecases/FindOneOrAllOrganizationsUsecase.ts index f992a56..659ed27 100644 --- a/src/modules/organizations/interactors/usecases/FindOneOrAllOrganizationsUsecase.ts +++ b/src/modules/organizations/interactors/usecases/FindOneOrAllOrganizationsUsecase.ts @@ -39,18 +39,18 @@ export class FindOneOrAllOrganizationsUsecase implements UseCase { if (!organizations) return left(new OrganizationNotFoundError()); - if (!userId) { - return right([ - { - id: organizations[0].id, - name: organizations[0].name, - code: organizations[0].code, - createdAt: organizations[0].createdAt, - updatedAt: organizations[0].updatedAt, - roleInOrganization: undefined, - }, - ]); - } + // if (!userId) { + // return right([ + // { + // id: organizations[0].id, + // name: organizations[0].name, + // code: organizations[0].code, + // createdAt: organizations[0].createdAt, + // updatedAt: organizations[0].updatedAt, + // roleInOrganization: undefined, + // }, + // ]); + // } const organizationsWithRoleInOrganization: OrganizationEntityWithRoleInOrganization[] = organizations.map((organization) => { diff --git a/src/modules/organizations/organizations.module.ts b/src/modules/organizations/organizations.module.ts index 340fe29..f227108 100644 --- a/src/modules/organizations/organizations.module.ts +++ b/src/modules/organizations/organizations.module.ts @@ -53,10 +53,10 @@ export class OrganizationsModule implements NestModule { configure(consumer: MiddlewareConsumer) { consumer .apply(AuthenticationMiddleware) - .exclude({ - path: 'v1/organizations/:id', - method: RequestMethod.GET, - }) + // .exclude({ + // path: 'v1/organizations/:id', + // method: RequestMethod.GET, + // }) .forRoutes({ path: 'v1/organizations*', method: RequestMethod.ALL }); } }