fix(gdpr): radera user_terms_consents vid kontoradering + klassa i residual-testet
CI / Typecheck, test & build (push) Successful in 11m6s
CI / Typecheck, test & build (push) Successful in 11m6s
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user