Exemple #1
0
 public async Task <IActionResult> GetMyPayments()
 {
     try
     {
         var me = ExtractIdFromToken(Request.Headers[HttpRequestHeader.Authorization.ToString()]);
         return(Ok(await paymentService.GetMyPayments(me)));
     }
     catch (HttpResponseException)
     {
         throw;
     }
     catch (Exception)
     {
         throw new BadRequestApiException();
     }
 }
 public async Task <IActionResult> GetAllPaymentsByUserId([FromRoute(Name = "id")] Guid userId)
 {
     return(Ok(await paymentsService.GetMyPayments(userId)));
 }