Update Versi 1.5.27 #32

Merged
bagasbanuna merged 1009 commits from staging into main 2025-12-17 12:22:28 +08:00
117 changed files with 9548 additions and 3041 deletions
Showing only changes of commit 1b64594ed1 - Show all commits

View File

@@ -42,7 +42,7 @@ export default async function RootLayout({
children: React.ReactNode;
}) {
// if (!token) return <>Require Token Storage</>;
// const userLoginId = await funGetUserIdByToken();
const userLoginId = await funGetUserIdByToken();
return (
<RootStyleRegistry>

View File

@@ -1,17 +0,0 @@
"use server";
import { prisma } from "@/app/lib";
import _ from "lodash";
import { cookies } from "next/headers";
export async function funCheckToken() {
const c = cookies().get("mySession");
const cekToken = await prisma.userSession.findFirst({
where: {
token: c?.value,
},
});
if (cekToken === null) return false;
return true;
}

View File

@@ -5,8 +5,7 @@ import { RouterAuth } from "@/app/lib/router_hipmi/router_auth";
import { permanentRedirect } from "next/navigation";
export async function funGlobal_getUserById({ userId }: { userId: string }) {
if (!userId) return permanentRedirect(RouterAuth.login);
// if (!userId) return permanentRedirect(RouterAuth.login);
const data = await prisma.user.findFirst({
where: {
id: userId,

View File

@@ -1,4 +1,4 @@
import { funCheckToken } from "./fun_cek_token";
import { funGlobal_CheckProfile } from "./fun_check_profile";
import { funGlobal_getNomorAdmin } from "./fun_get_nomor_admin";
import { funGetUserIdByToken } from "./fun_get_user_id_by_token";
@@ -6,6 +6,5 @@ import { funGlobal_getMasterKategoriApp } from "./fun_master_kategori_app";
export { funGlobal_getMasterKategoriApp };
export { funGlobal_getNomorAdmin };
export { funCheckToken };
export { funGetUserIdByToken };
export { funGlobal_CheckProfile };