fix and update
This commit is contained in:
@@ -40,8 +40,12 @@ export class NotificationsController {
|
||||
|
||||
@Get('unread-count')
|
||||
@ApiOperation({ summary: 'Количество непрочитанных уведомлений' })
|
||||
async unreadCount(@Headers('authorization') authorization: string | undefined) {
|
||||
const userId = await getAuthorizedUserId(this.jwt, this.core, authorization);
|
||||
async unreadCount(
|
||||
@Headers('authorization') authorization: string | undefined,
|
||||
@Headers('x-id-passive-activity') passiveActivity: string | undefined
|
||||
) {
|
||||
const touchActivity = passiveActivity !== '1';
|
||||
const userId = await getAuthorizedUserId(this.jwt, this.core, authorization, touchActivity);
|
||||
return firstValueFrom(this.core.notifications.GetUnreadCount({ userId }));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user