Fix evChargingAvailable type for listing create
This commit is contained in:
parent
c4e503989a
commit
3c3fb10c2c
1 changed files with 1 additions and 2 deletions
|
|
@ -321,8 +321,7 @@ export async function POST(req: Request) {
|
|||
const autoApprove = !saveDraft && (process.env.AUTO_APPROVE_LISTINGS === 'true' || auth.role === 'ADMIN');
|
||||
const status = saveDraft ? ListingStatus.DRAFT : autoApprove ? ListingStatus.PUBLISHED : ListingStatus.PENDING;
|
||||
const isSample = (contactEmail || '').toLowerCase() === SAMPLE_EMAIL;
|
||||
const evChargingAvailable =
|
||||
body.evChargingAvailable === undefined || body.evChargingAvailable === null ? null : Boolean(body.evChargingAvailable);
|
||||
const evChargingAvailable = Boolean(body.evChargingAvailable);
|
||||
|
||||
const listing = await prisma.listing.create({
|
||||
data: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue