Пример #1
0
        public async Task <IActionResult> UnbindAsync(Guid userId, string connectionId)
        {
            var preferences = new UnbindConnectionToUserCommand
            {
                UserId       = userId,
                ConnectionId = connectionId
            };

            await _mediator.Send(preferences);

            return(NoContent());
        }
Пример #2
0
        public async Task <IActionResult> UnbindMeAsync(string connectionId)
        {
            var preferences = new UnbindConnectionToUserCommand
            {
                UserId       = _contextAccessor.HttpContext.GetUserOrThrow().Id,
                ConnectionId = connectionId
            };

            await _mediator.Send(preferences);

            return(NoContent());
        }