chore(release): 0.4.0

This commit is contained in:
2026-05-05 15:00:14 +07:00
parent 5948d0e2a0
commit 9dfd0295d3
22 changed files with 239 additions and 89 deletions
+7 -2
View File
@@ -28,10 +28,15 @@ export const userRepo = {
return prisma.user.create({ data });
},
/**
* Tandai user sudah accept T&C/Privacy. Idempotent: kalau sudah `true`,
* tidak overwrite `acceptedAt` (audit trail pertama tetap akurat).
*/
async markAcceptedTerms(id: string) {
return prisma.user.update({
where: { id },
const result = await prisma.user.updateMany({
where: { id, acceptedTermsAndPrivacy: false },
data: { acceptedTermsAndPrivacy: true, acceptedAt: new Date() },
});
return { updated: result.count > 0 };
},
};