public async Task <IActionResult> GetWalletByUserId([FromRoute(Name = "id")] Guid UserId) { try { return(Ok(await walletsService.GetWalletByUserId(UserId))); } catch (HttpResponseException) { throw; } catch (Exception) { throw new BadRequestApiException(); } }
public async Task <IActionResult> GetWallet() { try { var id = ExtractIdFromToken(Request.Headers[HttpRequestHeader.Authorization.ToString()]); return(Ok(await service.GetWalletByUserId(id))); } catch (HttpResponseException) { throw; } catch (Exception) { throw new BadRequestApiException(); } }