- Layout katalog dan porto clear
# No isuue
This commit is contained in:
2024-04-20 00:19:28 +08:00
parent ed28b7d7b2
commit e062632de7
40 changed files with 526 additions and 94 deletions

View File

@@ -0,0 +1,22 @@
"use server";
import prisma from "@/app/lib/prisma";
import { revalidatePath } from "next/cache";
export default async function adminUserAccess_funEditAccess(
userId: string,
value: boolean
) {
const updt = await prisma.user.update({
where: {
id: userId,
},
data: {
active: value,
},
});
if (!updt) return { status: 400, message: "Update gagal" };
revalidatePath("/dev/admin/user-access");
return { status: 200, message: "Update berhasil" };
}