mirror of
https://github.com/D4M13N-D3V/comissions-app-core-api.git
synced 2025-03-14 10:04:55 +00:00
fix: added new model classes for the onboard status and url
This commit is contained in:
parent
a2d6c3fa3b
commit
ccde0d3fa7
@ -231,7 +231,7 @@ public class SellerProfileController : Controller
|
|||||||
existingSellerProfile = _dbContext.UserSellerProfiles.Update(existingSellerProfile).Entity;
|
existingSellerProfile = _dbContext.UserSellerProfiles.Update(existingSellerProfile).Entity;
|
||||||
await _dbContext.SaveChangesAsync();
|
await _dbContext.SaveChangesAsync();
|
||||||
var result = _paymentService.CreateSellerAccountOnboardingUrl(accountId);
|
var result = _paymentService.CreateSellerAccountOnboardingUrl(accountId);
|
||||||
return Ok(new { onboardUrl = result });
|
return Ok(new SellerOnboardUrlModel(){ OnboardUrl= result });
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
@ -259,7 +259,7 @@ public class SellerProfileController : Controller
|
|||||||
existingSellerProfile = _dbContext.UserSellerProfiles.Update(existingSellerProfile).Entity;
|
existingSellerProfile = _dbContext.UserSellerProfiles.Update(existingSellerProfile).Entity;
|
||||||
await _dbContext.SaveChangesAsync();
|
await _dbContext.SaveChangesAsync();
|
||||||
var result = _paymentService.SellerAccountIsOnboarded(accountId);
|
var result = _paymentService.SellerAccountIsOnboarded(accountId);
|
||||||
return Ok(new { onboarded=result });
|
return Ok(new SellerOnboardStatusModel(){ Onboarded= result });
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
@ -282,7 +282,10 @@ public class SellerProfileController : Controller
|
|||||||
return BadRequest();
|
return BadRequest();
|
||||||
|
|
||||||
var result = _paymentService.CreateSellerAccountOnboardingUrl(existingSellerProfile.StripeAccountId);
|
var result = _paymentService.CreateSellerAccountOnboardingUrl(existingSellerProfile.StripeAccountId);
|
||||||
return Ok(new { onboardUrl = result });
|
return Ok(new SellerOnboardUrlModel()
|
||||||
|
{
|
||||||
|
OnboardUrl = result
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
namespace comissions.app.api.Models.SellerProfile;
|
||||||
|
|
||||||
|
public class SellerOnboardStatusModel
|
||||||
|
{
|
||||||
|
public bool Onboarded { get; set; }
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
namespace comissions.app.api.Models.SellerProfile;
|
||||||
|
|
||||||
|
public class SellerOnboardUrlModel
|
||||||
|
{
|
||||||
|
public string OnboardUrl { get; set; }
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user