Пример #1
0
        public Task <IActionResult> UpdateInfo(string username, string name)
        {
            Guid ownerId = Guid.Parse(User.FindFirst(ClaimTypes.NameIdentifier)?.Value ??
                                      throw new Exception("Invalid token"));

            _updateUserInfoRequestHandler.Handle(ownerId, username, name);
            return(Task.FromResult <IActionResult>(Json(new
            {
                result = "ok"
            })));
        }
Пример #2
0
        public async Task Consume(ConsumeContext <SendUser> context)
        {
            var user = context.Message.user;

            await _updateUserInfoRequestHandler.Handle(user);
        }