public async Task <IActionResult> CountUnreadNotifications([FromQuery] CountUnreadNotificationsRequest request)
        {
            var response = await mediator.Send(request);

            Log.Information($"User #{HttpContext.GetCurrentUserId()} counted their unread notifications");

            return(this.CreateResponse(response));
        }
示例#2
0
        public async Task <IActionResult> CountUnreadNotifications([FromQuery] CountUnreadNotificationsRequest request)
        {
            var response = await mediator.Send(request);

            logger.LogResponse(
                $"User #{HttpContext.GetCurrentUserId()} has {response?.UnreadNotificationsCount} unread notifications",
                response.Error);

            return(this.CreateResponse(response));
        }