This commit is contained in:
Damien Ostler 2024-02-14 23:24:52 -05:00
parent 0bbcf9debe
commit 0ace08640b

View File

@ -159,10 +159,7 @@ public class SellerProfileController : Controller
var existingSellerProfile = await _dbContext.UserSellerProfiles.FirstOrDefaultAsync(sellerProfile=>sellerProfile.UserId==userId); var existingSellerProfile = await _dbContext.UserSellerProfiles.FirstOrDefaultAsync(sellerProfile=>sellerProfile.UserId==userId);
if (existingSellerProfile == null) if (existingSellerProfile == null)
{ {
var sellerProfileRequest = await _dbContext.SellerProfileRequests.FirstOrDefaultAsync(request=>request.UserId==userId && request.Accepted==false);
if(sellerProfileRequest!=null)
return BadRequest(); return BadRequest();
return Unauthorized();
} }
if(existingSellerProfile.Suspended) if(existingSellerProfile.Suspended)