Skip to content

Commit

Permalink
fix(notification-service): hard deleting notif users for gdpr complia…
Browse files Browse the repository at this point in the history
…nce (#117)
  • Loading branch information
vineet-suri authored Feb 4, 2021
1 parent 4a4cb87 commit af33640
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,28 @@ export class NotificationUserController {
);
}

@authenticate(STRATEGY.BEARER, {
passReqToCallback: true,
})
@authorize({permissions: [PermissionKey.DeleteNotification]})
@del(`${basePath}/hard`, {
responses: {
[STATUS_CODE.NO_CONTENT]: {
description: 'Notification DELETE success',
},
},
})
async deleteAllHard(
@inject(AuthenticationBindings.CURRENT_USER)
currentUser: IAuthUserWithPermissions,
@param.query.object('where', getWhereSchemaFor(NotificationUser))
where?: Where<NotificationUser>,
): Promise<Count> {
return this.notificationUserRepository.deleteAllHard(
this._createWhereBuilder(currentUser, where).build(),
);
}

private async _verifyOwned(
id: string,
currentUser: IAuthUserWithPermissions,
Expand Down

0 comments on commit af33640

Please sign in to comment.