Skip to content

Commit

Permalink
fix: 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
ocitocit committed Nov 2, 2023
1 parent 0ea54a7 commit aec5537
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/api/listings/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export async function POST(request: Request) {
price
} = body;

Object.keys(body).forEach((value: any) => {
if (!body[value]) {
NextResponse.error();
}
});

const listing = await prisma.listing.create({
data: {
title,
Expand Down

0 comments on commit aec5537

Please sign in to comment.