Merge pull request #418 from bipproduction/amalia/11-apr-25

fix: kode otp
This commit is contained in:
Amalia
2025-04-11 10:45:18 +08:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
export async function GET(request: Request) {
try {
return NextResponse.json({ success: true, version: "1.3.0", tahap: "beta", update: "update baru : menampilkan notifikasi pengumuman setelah login" }, { status: 200 });
return NextResponse.json({ success: true, version: "1.3.1", tahap: "beta", update: "- update baru : menampilkan notifikasi pengumuman setelah login; - fix random nomer kode otp 4 digit" }, { status: 200 });
} catch (error) {
console.error(error);
return NextResponse.json({ success: false, version: "Gagal mendapatkan version, coba lagi nanti (error: 500)", reason: (error as Error).message, }, { status: 500 });

View File

@@ -34,7 +34,7 @@ function ViewLogin() {
})
const cekLogin = await cek.json()
if (cekLogin.success) {
const code = Math.floor(Math.random() * 1000) + 1000
const code = Math.floor(1000 + Math.random() * 9000)
try {
const res = await fetch(`https://wa.wibudev.com/code?nom=${cekLogin.phone}&text=*DARMASABA*%0A%0A
JANGAN BERIKAN KODE RAHASIA ini kepada siapa pun TERMASUK PIHAK DARMASABA. Masukkan otentikasi: *${encodeURIComponent(code)}*`).then(

View File

@@ -3,7 +3,7 @@ import { LayoutLogin, WARNA } from "@/module/_global";
import { IVerification } from "@/types";
import { Anchor, Box, Button, Group, PinInput, Stack, Text, Title } from "@mantine/core";
import { useRouter } from "next/navigation";
import React, { useState } from "react";
import { useState } from "react";
import toast from "react-hot-toast";
import funSetCookies from "../../api/funSetCookies";
@@ -15,7 +15,7 @@ export default function ViewVerification({ phone, otp, user }: IVerification) {
async function onResend() {
try {
const code = Math.floor(Math.random() * 1000) + 1000
const code = Math.floor(1000 + Math.random() * 9000)
const res = await fetch(`https://wa.wibudev.com/code?nom=${phone}&text=*DARMASABA*%0A%0A
JANGAN BERIKAN KODE RAHASIA ini kepada siapa pun TERMASUK PIHAK DARMASABA. Masukkan otentikasi: *${encodeURIComponent(code)}*`)
.then(