# feat
## Deskripsi: - Edit map - Sinkronisasi dengan data portofolio ### No Issue
This commit is contained in:
@@ -2,15 +2,12 @@
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function auth_funEditAktivasiKodeOtpById(otpId: string) {
|
||||
export async function auth_funDeleteAktivasiKodeOtpById(otpId: string) {
|
||||
// console.log(otpId);
|
||||
const updt = await prisma.kodeOtp.update({
|
||||
const updt = await prisma.kodeOtp.delete({
|
||||
where: {
|
||||
id: otpId,
|
||||
},
|
||||
data: {
|
||||
isActive: false,
|
||||
},
|
||||
});
|
||||
|
||||
if (!updt) return { status: 400, message: "Gagal Update Aktivasi Kode OTP" };
|
||||
|
||||
@@ -9,7 +9,10 @@ export async function auth_funLogin(nomor: string) {
|
||||
|
||||
try {
|
||||
const res = await fetch(
|
||||
`https://wa.wibudev.com/code?nom=${nomor}&text=HIPMI - Masukan kode OTP sesuai dengan nomor yang anda daftarkan, kode ini bersifat rahasia & jangan di bagikan pada siapapun termasuk anggota ataupun pengurus HIPMI lainnya. Kode OTP anda: ${codeOtp}`
|
||||
`https://wa.wibudev.com/code?nom=${nomor}&text=HIPMI - Kode ini bersifat RAHASIA dan JANGAN DI BAGIKAN KEPADA SIAPAPUN, termasuk anggota ataupun pengurus HIPMI lainnya.
|
||||
\n
|
||||
>> Kode OTP anda: ${codeOtp}.
|
||||
`
|
||||
);
|
||||
|
||||
const sendWa = await res.json();
|
||||
@@ -31,6 +34,7 @@ export async function auth_funLogin(nomor: string) {
|
||||
kodeOtpId: createOtpId.id,
|
||||
};
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return { status: 500, message: "Server Error !!!" };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,13 +14,12 @@ export async function auth_Logout(kodeId: string) {
|
||||
const c = cookies().get("ssn");
|
||||
if (c?.value !== "") return { status: 400, message: "Gagal Logout" };
|
||||
|
||||
const del = await prisma.kodeOtp.delete({
|
||||
where: {
|
||||
id: kodeId,
|
||||
},
|
||||
});
|
||||
|
||||
if (!del) return { status: 400, message: "Gagal Hapus Kode OTP Id"};
|
||||
// const del = await prisma.kodeOtp.delete({
|
||||
// where: {
|
||||
// id: kodeId,
|
||||
// },
|
||||
// });
|
||||
// if (!del) return { status: 400, message: "Gagal Hapus Kode OTP Id"};
|
||||
// revalidatePath("/dev/katalog")
|
||||
return { status: 200, message: "Logout Berhasil" };
|
||||
}
|
||||
|
||||
@@ -9,5 +9,5 @@ export async function auth_getKodeOtpById(otpId: string) {
|
||||
},
|
||||
});
|
||||
|
||||
return data
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user