mirror of
https://github.com/D4M13N-D3V/comissions-app-core-api.git
synced 2025-03-14 10:04:55 +00:00
fix: made the url endpoint better
This commit is contained in:
parent
3baa67fda3
commit
6b43c1bf8b
@ -733,8 +733,11 @@ public class RequestsController : Controller
|
||||
.FirstOrDefaultAsync(x=>x.Id==requestId);
|
||||
if(request==null)
|
||||
return NotFound();
|
||||
var paymentUrl = _paymentService.Charge(request.Id,request.Artist.StripeAccountId,Convert.ToDouble(request.Amount));
|
||||
return Ok(new {paymentUrl});
|
||||
if(request.PaymentUrl==null)
|
||||
request.PaymentUrl = _paymentService.Charge(request.Id,request.Artist.StripeAccountId,Convert.ToDouble(request.Amount));
|
||||
_dbContext.Entry(request).State = EntityState.Modified;
|
||||
_dbContext.SaveChanges();
|
||||
return Ok(new {paymentUrl = request.PaymentUrl});
|
||||
}
|
||||
|
||||
[Authorize("read:request")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user