delete file tamplate

This commit is contained in:
2025-02-05 11:49:09 +08:00
parent 0d515797f5
commit 331b5c9a84
36 changed files with 16 additions and 1110 deletions

View File

@@ -11,8 +11,7 @@ async function DELETE(request: Request) {
}
try {
// Ambil parameter nomor dari URL
const { searchParams } = new URL(request.url);
const nomor = searchParams.get("nomor");
const { nomor } = await request.json();
// Validasi parameter nomor
if (!nomor) {
@@ -27,6 +26,9 @@ async function DELETE(request: Request) {
// Cek apakah data OTP dengan nomor tersebut ada
const existingOtp = await prisma.kodeOtp.findFirst({
orderBy: {
createdAt: "desc",
},
where: { nomor },
});