public async Task <IActionResult> DeleteUser(UserForAuthDto userForDeleteDto) { userForDeleteDto.email = userForDeleteDto.email.ToLower(); var userFromRepo = await _repo.Login(userForDeleteDto.email, userForDeleteDto.password); if (userFromRepo == null) { return(Unauthorized()); } if (await _repo.DeleteUser(userForDeleteDto.email, userForDeleteDto.password)) { return(Ok()); } else { return(BadRequest()); } }
public async Task <IActionResult> DeleteUser(string uuid) { var userDeleteSuccess = await _repo.DeleteUser(uuid); return(!userDeleteSuccess ? (IActionResult)BadRequest() : Ok(true)); }