mirror of
https://github.com/D4M13N-D3V/comissions-app-core-api.git
synced 2025-03-14 10:04:55 +00:00
fix: added endpoint to get esllerpage by sellername
This commit is contained in:
parent
823c77c602
commit
2d230f302c
@ -50,6 +50,20 @@ public class DiscoveryController : Controller
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
[Route("Sellers/{sellerName}/Page")]
|
||||
public async Task<IActionResult> GetSellerPage(string sellerName)
|
||||
{
|
||||
var seller = await _dbContext.UserSellerProfiles
|
||||
.Include(x=>x.SellerProfilePageSettings)
|
||||
.FirstOrDefaultAsync(x=>x.Name==sellerName.Replace('-', ' '));
|
||||
if(seller==null)
|
||||
return NotFound();
|
||||
var result = seller.SellerProfilePageSettings;
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("Sellers/{sellerId:int}/Portfolio")]
|
||||
public async Task<IActionResult> GetSellerPortfolio(int sellerId, int offset = 0, int pageSize = 10)
|
||||
|
Loading…
x
Reference in New Issue
Block a user