create review and profile
This commit is contained in:
@@ -10,6 +10,20 @@ export const userRepo = {
|
||||
return prisma.user.findUnique({ where: { id } });
|
||||
},
|
||||
|
||||
/** Profil publik (tanpa password) untuk halaman akun. */
|
||||
async findPublicProfileById(id: string) {
|
||||
return prisma.user.findUnique({
|
||||
where: { id },
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
email: true,
|
||||
image: true,
|
||||
createdAt: true,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
async create(data: Prisma.UserCreateInput) {
|
||||
return prisma.user.create({ data });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user