Admin
# feat: - Admin ganti status review ke publish
This commit is contained in:
@@ -2,34 +2,35 @@
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export async function funGetUserProfile(userId: string) {
|
||||
export async function funGetUserProfile( userId: string ) {
|
||||
|
||||
const user = await prisma.user.findUnique({
|
||||
where: {
|
||||
id: userId
|
||||
id: userId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
nomor: true,
|
||||
Profile: {
|
||||
select: {
|
||||
id: true,
|
||||
alamat: true,
|
||||
email: true,
|
||||
jenisKelamin: true,
|
||||
name: true,
|
||||
ImageProfile: {
|
||||
select: {
|
||||
url: true,
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
nomor: true,
|
||||
Profile: {
|
||||
select: {
|
||||
id: true,
|
||||
alamat: true,
|
||||
email: true,
|
||||
jenisKelamin: true,
|
||||
name: true,
|
||||
ImageProfile: {
|
||||
select: {
|
||||
url: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
revalidatePath("/dev/home");
|
||||
revalidatePath("/dev/katalog/view")
|
||||
revalidatePath("/dev/katalog/view");
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user