public IActionResult Add(UserAuth userAuth) { var result = _userAuthService.Add(userAuth); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public IDataResult <UserAuth> Register(UserForRegisterDto userForRegisterDto, string password) { byte[] passwordHash, passwordSalt; HashingHelper.CreatePasswordHash(password, out passwordHash, out passwordSalt); var userAuth = new UserAuth { Email = userForRegisterDto.Email, FirstName = userForRegisterDto.FirstName, LastName = userForRegisterDto.LastName, PasswordHash = passwordHash, PasswordSalt = passwordSalt, Status = true }; _userAuthService.Add(userAuth); return(new SuccessDataResult <UserAuth>(userAuth, Messages.UserRegistered)); }
public Task <IResultModel> Add(UserAuthAddModel model) { return(_service.Add(model)); }