create review and profile

This commit is contained in:
arifal
2026-04-20 00:25:05 +07:00
parent 7159e9108f
commit ba5f64ae0e
37 changed files with 3324 additions and 109 deletions
+14
View File
@@ -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 });
},