Collaboration: Room chat
# feat - chatting antar user - lihat info grup ## No issue
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function auth_funEditAktivasiKodeOtpById(otpId: string) {
|
||||
console.log(otpId);
|
||||
// console.log(otpId);
|
||||
const updt = await prisma.kodeOtp.update({
|
||||
where: {
|
||||
id: otpId,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { randomOTP } from "./rondom_otp";
|
||||
|
||||
export async function auth_funLogin(nomor: string) {
|
||||
const codeOtp = randomOTP();
|
||||
console.log(nomor)
|
||||
// console.log(nomor)
|
||||
|
||||
try {
|
||||
const res = await fetch(
|
||||
|
||||
@@ -81,6 +81,7 @@ export default function Register({ dataOtp }: { dataOtp: any }) {
|
||||
await auth_funEditAktivasiKodeOtpById(dataOtp.id).then((val) => {
|
||||
if (val.status === 200) {
|
||||
ComponentGlobal_NotifikasiBerhasil(res.message);
|
||||
setLoading(true);
|
||||
router.push(RouterHome.main_home);
|
||||
} else {
|
||||
ComponentGlobal_NotifikasiPeringatan(val.message);
|
||||
@@ -94,7 +95,6 @@ export default function Register({ dataOtp }: { dataOtp: any }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
{/* <pre>{JSON.stringify(dataOtp,null,2)}</pre> */}
|
||||
|
||||
<Center>
|
||||
@@ -140,7 +140,6 @@ export default function Register({ dataOtp }: { dataOtp: any }) {
|
||||
color={"teal"}
|
||||
onClick={() => {
|
||||
onRegistarsi();
|
||||
setLoading(true);
|
||||
}}
|
||||
>
|
||||
<Text>DAFTAR</Text>
|
||||
|
||||
@@ -88,6 +88,7 @@ export default function Validasi({ dataOtp }: { dataOtp: any }) {
|
||||
if (val.status === 200) {
|
||||
if (res.role === "1") {
|
||||
ComponentGlobal_NotifikasiBerhasil(res.message);
|
||||
setLoading(true);
|
||||
router.push(RouterHome.main_home);
|
||||
} else {
|
||||
router.push(RouterAdminDashboard.splash_admin);
|
||||
@@ -105,7 +106,6 @@ export default function Validasi({ dataOtp }: { dataOtp: any }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
<Center h={"100vh"}>
|
||||
<Stack px={"lg"} spacing={"xl"} w={{ base: 400 }} justify="center">
|
||||
<Center>
|
||||
@@ -143,7 +143,6 @@ export default function Validasi({ dataOtp }: { dataOtp: any }) {
|
||||
color={"teal"}
|
||||
onClick={() => {
|
||||
onVerifikasi();
|
||||
setLoading(true);
|
||||
}}
|
||||
>
|
||||
<Text>VERIFIKASI</Text>
|
||||
|
||||
Reference in New Issue
Block a user