Portofolio

#feat
- Create porto
- Edit Porto
- Upload gambar background profile
- List user
- Search user
## No issuue
This commit is contained in:
2024-01-19 14:16:16 +08:00
parent 01da30bdb5
commit 5f4337333a
175 changed files with 3451 additions and 1017 deletions

View File

@@ -0,0 +1,39 @@
"use server";
import prisma from "@/app/lib/prisma";
import { revalidatePath } from "next/cache";
export async function funGetUserProfile( userId: string ) {
const user = await prisma.user.findUnique({
where: {
id: userId,
},
select: {
id: true,
username: true,
nomor: true,
Profile: {
select: {
id: true,
alamat: true,
email: true,
jenisKelamin: true,
name: true,
imagesId: true,
ImageProfile: {
select: {
url: true,
},
},
ImagesBackground: true,
imagesBackgroundId: true,
},
},
},
});
revalidatePath("/dev/home");
revalidatePath("/dev/katalog/view");
return user;
}