Skip to content

Commit

Permalink
enable cors
Browse files Browse the repository at this point in the history
  • Loading branch information
poojakarma committed Aug 20, 2024
1 parent 21b261e commit 9214bb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ async function bootstrap() {
.build();
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api/swagger-docs', app, document);
app.enableCors();
await app.listen(4000);
}
bootstrap();
9 changes: 1 addition & 8 deletions src/modules/notification/notification.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,7 @@ export class NotificationService {
e,
'/Not able to send Notification',
);
const errorMessage = e.message || 'Internal server error';
return APIResponse.error(
response,
apiId,
'Something went wrong',
errorMessage,
HttpStatus.INTERNAL_SERVER_ERROR
);
throw e;
}
}

Expand Down

0 comments on commit 9214bb5

Please sign in to comment.