fix(gdpr): radera user_terms_consents vid kontoradering + klassa i residual-testet
CI / Typecheck, test & build (push) Successful in 11m6s

This commit is contained in:
Sven (AAMOS AI)
2026-08-14 00:45:42 +07:00
parent e96213e907
commit 0d1cc727ae
2 changed files with 13 additions and 0 deletions
+11
View File
@@ -188,6 +188,17 @@ export async function eraseUser(db: Database, userId: string): Promise<ErasureLo
count: consentsDel.length,
});
const termsConsentsDel = await db
.delete(schema.userTermsConsents)
.where(eq(schema.userTermsConsents.userId, userId))
.returning({ userId: schema.userTermsConsents.userId });
if (termsConsentsDel.length)
log.push({
table: getTableName(schema.userTermsConsents),
action: "delete",
count: termsConsentsDel.length,
});
const idemDel = await db
.delete(schema.idempotencyKeys)
.where(eq(schema.idempotencyKeys.userId, userId))