public async Task <ActionResult <string[]> > GetAsync() { var user = new Domain.Client.DTO.User() { Identification = "Anderson8", Password = "******" }; // _object = await _userRepository.Insert(user); // return _object.Message.ToArray(); _object = await _userRepository.Login(user.Identification, user.Password); if (_object.Sucess) { var userLoggedDTO = new WorkShop.Domain.Client.DTO.UserLogged() { UserId = _object.Object.Id, DataLogged = DateTime.UtcNow }; await _userLoggedEvent.PingAsync(userLoggedDTO); } return(Ok(_object.Message.ToArray())); }
public async Task <WorkShop.Domain.Client.DTO.UserLogged> PingAsync([FromQuery] string key, [FromQuery] Guid userId) { var userLogged = new WorkShop.Domain.Client.DTO.UserLogged() { Hash = key, UserId = userId }; return(await _userLoggedEvent.PingAsync(userLogged)); }