fix: the bug in transaction list user side
This commit is contained in:
@@ -99,8 +99,15 @@ export class NotificationsService {
|
||||
|
||||
//************************ */
|
||||
|
||||
async countUserNotifications(userId: string) {
|
||||
const notificationCount = await this.notificationRepository.count({ where: { recipient: { id: userId }, isRead: false } });
|
||||
return notificationCount;
|
||||
}
|
||||
|
||||
//************************ */
|
||||
|
||||
async markAllAsRead(userId: string) {
|
||||
await this.notificationRepository.update({ recipient: { id: userId } }, { isRead: true });
|
||||
await this.notificationRepository.delete({ recipient: { id: userId } });
|
||||
return {
|
||||
message: CommonMessage.UPDATE_SUCCESS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user