fix middleware

This commit is contained in:
2025-02-05 15:07:18 +08:00
parent 331b5c9a84
commit 6dc4e7afc3
10 changed files with 713 additions and 203 deletions

View File

@@ -35,18 +35,15 @@ const apiPostVerifikasiCodeOtp = async ({ nomor }: { nomor: string }) => {
return await respone.json().catch(() => null);
};
const apiDeleteAktivasiKodeOtpByNomor = async ({
nomor,
}: {
nomor: string;
}) => {
const respone = await fetch(`/api/auth/code`, {
const apiDeleteAktivasiKodeOtpByNomor = async ({ id }: { id: string }) => {
const respone = await fetch(`/api/auth/code/${id}`, {
method: "DELETE",
body: JSON.stringify({nomor}),
headers: {
"Content-Type": "application/json",
}
},
});
console.log("respone delete", await respone.json());
return await respone.json().catch(() => null);
};