Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix(security): add missing await for authorization checks in notifications service

Faizan725321f15812
diff --git a/packages/nocodb/src/services/notifications/notifications.service.ts b/packages/nocodb/src/services/notifications/notifications.service.ts
index 7f450fdf2c..76aed12580 100644
--- a/packages/nocodb/src/services/notifications/notifications.service.ts
+++ b/packages/nocodb/src/services/notifications/notifications.service.ts
@@ -150,7 +150,7 @@ export class NotificationsService implements OnModuleInit, OnModuleDestroy {
body;
user: UserType;
}) {
- const notification = Notification.get({
+ const notification = await Notification.get({
id: param.notificationId,
fk_user_id: param.user.id,
});
@@ -164,7 +164,7 @@ export class NotificationsService implements OnModuleInit, OnModuleDestroy {
}
async notificationDelete(param: { notificationId: string; user: UserType }) {
- const notification = Notification.get({
+ const notification = await Notification.get({
id: param.notificationId,
fk_user_id: param.user.id,
});