Update Versi 1.5.27 #32

Merged
bagasbanuna merged 1009 commits from staging into main 2025-12-17 12:22:28 +08:00
2062 changed files with 85908 additions and 22493 deletions
Showing only changes of commit b849fead02 - Show all commits

View File

@@ -15,6 +15,20 @@ export async function POST(req: Request) {
const codeOtp = randomOTP();
const body = await req.json();
const { nomor } = body;
const createOtpId = await prisma.kodeOtp.create({
data: {
nomor: nomor,
otp: codeOtp,
},
});
if (!createOtpId)
return NextResponse.json(
{ success: false, message: "Gagal mengirim kode OTP" },
{ status: 400 }
);
const res = await fetch(
`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
@@ -30,19 +44,6 @@ export async function POST(req: Request) {
{ status: 400 }
);
const createOtpId = await prisma.kodeOtp.create({
data: {
nomor: nomor,
otp: codeOtp,
},
});
if (!createOtpId)
return NextResponse.json(
{ success: false, message: "Gagal mengirim kode OTP" },
{ status: 400 }
);
return NextResponse.json(
{
success: true,
@@ -54,7 +55,11 @@ export async function POST(req: Request) {
} catch (error) {
backendLogger.log("Error Login", error);
return NextResponse.json(
{ success: false, message: "Terjadi masalah saat login" , reason: error as Error },
{
success: false,
message: "Terjadi masalah saat login",
reason: error as Error,
},
{ status: 500 }
);
} finally {

View File

@@ -39,6 +39,7 @@ export default function Login({ version }: { version: string }) {
router.push("/validasi", { scroll: false });
} else {
setLoading(false);
console.log("respone >>", respone);
ComponentGlobal_NotifikasiPeringatan(respone?.message);
}
} catch (error) {