public async Task <IActionResult> ModifyWallet(string id, [FromBody] ModifyWalletRequest request) { // checking if wallet exists and user owns the specified wallet var wallet = await GetClientWallet(id); if (wallet == null) { return(NotFound()); } wallet = await _clientAccountService.ModifyWalletAsync(id, request.Name, request.Description); if (wallet == null) { return(NotFound()); } return(Ok(new WalletModel { Id = wallet.Id, Name = wallet.Name, Type = wallet.Type, Description = wallet.Description })); }