Portofolio
#feat - Create porto - Edit Porto - Upload gambar background profile - List user - Search user ## No issuue
This commit is contained in:
17
src/app_modules/home/fun/get/get_one_user_by_id.ts
Normal file
17
src/app_modules/home/fun/get/get_one_user_by_id.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function User_getOneById(userId: string) {
|
||||
const data = await prisma.user.findFirst({
|
||||
where: {
|
||||
id: userId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
Profile: true,
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
Reference in New Issue
Block a user