Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
hofstede-matheus committed Oct 5, 2023
1 parent d4d986b commit 191d63a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
8 changes: 4 additions & 4 deletions src/modules/organizations/organizations.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}

0 comments on commit 191d63a

Please sign in to comment.