Skip to content

Commit 5544bf8

Browse files
committed
wrap all relevant API returns with auth.verify()
1 parent e6dad7b commit 5544bf8

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

app/api/v2/escape/menu/categories/[categoryId]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ export async function DELETE(
4040
);
4141
});
4242

43-
return NextResponse.json({})
43+
return auth.verify(NextResponse.json({}))
4444
}

app/api/v2/escape/menu/categories/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function PATCH(
3030
})
3131

3232

33-
return NextResponse.json(JSON.stringify(newProduct));
33+
return authCheck.verify(NextResponse.json(JSON.stringify(newProduct)));
3434
}
3535

3636

@@ -52,5 +52,5 @@ export async function POST(
5252
data: category
5353
});
5454

55-
return NextResponse.json(JSON.stringify(newCategory));
55+
return authCheck.verify(NextResponse.json(JSON.stringify(newCategory)));
5656
}

app/api/v2/escape/menu/products/[productId]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ export async function DELETE(
4141
}
4242
}
4343

44-
return NextResponse.json(JSON.stringify({}));
44+
return authCheck.verify(NextResponse.json(JSON.stringify({})));
4545
}

app/api/v2/escape/menu/products/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function PATCH(
2828
data: product
2929
});
3030

31-
return NextResponse.json(JSON.stringify(newProduct));
31+
return authCheck.verify(NextResponse.json(JSON.stringify(newProduct)));
3232
}
3333

3434

@@ -51,7 +51,7 @@ export async function POST(
5151
data: product
5252
});
5353

54-
return NextResponse.json(JSON.stringify({}));
54+
return authCheck.verify(NextResponse.json(JSON.stringify({})));
5555
}
5656

5757
const menuCategoryWithProducts = Prisma.validator<Prisma.MenuCategoryDefaultArgs>()({include: {menu_products: true}})

0 commit comments

Comments
 (0)