Пример #1
0
        public async Task <IActionResult> ChangeRenterAccount(Customer renter)
        {
            if (renter == null)
            {
                return(BadRequest(nameof(renter)));
            }

            try
            {
                var result = _userAccountService.ChangeRenterAccount(renter);
                if (result)
                {
                    return(Ok());
                }
            }
            catch (ArgumentNullException)
            {
                return(BadRequest(nameof(renter)));
            }
            catch (Exception exception)
            {
                return(StatusCode(500));
            }
            return(StatusCode(500));
        }