Fix: middleware
Deskripsi - Fix middleware - Fix metode login ( sekarang menggunakan api )
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { funCheckCookies } from "@/app_modules/_global/fun/get/fun_check_cookies";
|
||||
|
||||
import { Login } from "@/app_modules/auth";
|
||||
import versionUpdate from "../../../../package.json";
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import { Register } from "@/app_modules/auth";
|
||||
import { auth_getCodeOtpByNumber } from "@/app_modules/auth/fun/get_kode_otp_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let otpId = params.id;
|
||||
const dataOtp = await auth_getCodeOtpByNumber({ kodeId: otpId });
|
||||
return <Register dataOtp={dataOtp} />;
|
||||
}
|
||||
5
src/app/(user)/register/page.tsx
Normal file
5
src/app/(user)/register/page.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Register } from "@/app_modules/auth";
|
||||
|
||||
export default async function Page() {
|
||||
return <Register />;
|
||||
}
|
||||
7
src/app/(user)/splash/page.tsx
Normal file
7
src/app/(user)/splash/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import { SplashScreen } from "@/app_modules/auth";
|
||||
|
||||
export default async function Page() {
|
||||
return <>
|
||||
<SplashScreen/>
|
||||
</>
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Validasi } from "@/app_modules/auth";
|
||||
import { auth_getCodeOtpByNumber } from "@/app_modules/auth/fun/get_kode_otp_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let kodeId = params.id;
|
||||
const dataOtp = await auth_getCodeOtpByNumber({ kodeId: kodeId });
|
||||
|
||||
return <Validasi dataOtp={dataOtp as any} />;
|
||||
}
|
||||
5
src/app/(user)/validasi/page.tsx
Normal file
5
src/app/(user)/validasi/page.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Validasi } from "@/app_modules/auth";
|
||||
|
||||
export default async function Page() {
|
||||
return <Validasi />;
|
||||
}
|
||||
19
src/app/(user)/waiting-room/page.tsx
Normal file
19
src/app/(user)/waiting-room/page.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { funGlobal_checkActivationUseById } from "@/app_modules/_global/fun/get/fun_check_activation_use_by_id";
|
||||
import WaitingRoom_View from "@/app_modules/waiting_room/view";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const activationUser = await funGlobal_checkActivationUseById({
|
||||
userId: userLoginId as string,
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<WaitingRoom_View
|
||||
activationUser={activationUser as boolean}
|
||||
userLoginId={userLoginId as string}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user