use crypto package instead
This commit is contained in:
@@ -210,10 +210,12 @@ export class SpamShieldService {
|
||||
const confidence = Math.min(matches.reduce((sum, m) => sum + m.score, 0), 1.0);
|
||||
const decision = confidence > 0.8 ? 'BLOCK' : confidence > 0.5 ? 'FLAG' : 'ALLOW';
|
||||
|
||||
const encrypted = FieldEncryptionService.encrypt(validated);
|
||||
|
||||
const auditLog = await prisma.spamAuditLog.create({
|
||||
data: {
|
||||
userId: 'system',
|
||||
phoneNumber: validated,
|
||||
phoneNumber: encrypted,
|
||||
decision: decision as any,
|
||||
reason: `Rule-based analysis`,
|
||||
ruleId: ruleMatchIds[0],
|
||||
|
||||
Reference in New Issue
Block a user