fix: add enrichWithNames to content-safety checks
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 48s

This commit is contained in:
wangdl 2026-06-19 13:27:10 +08:00
parent 0203ccfd1f
commit 9a392ba274

View File

@ -2,6 +2,7 @@ import { Injectable, Logger } from '@nestjs/common';
import { PrismaService } from '../../infrastructure/database/prisma.service';
import { RedisService } from '../../infrastructure/redis/redis.service';
import { QueueService } from '../../infrastructure/queue/queue.service';
import { enrichWithNames } from '../../common/helpers/name-resolver';
const SW_CACHE_KEY = 'safety:words';
const SW_CACHE_TTL = 300;
@ -76,7 +77,10 @@ export class ContentSafetyService {
}
async getAllWords() { return this.prisma.sensitiveWord.findMany({ orderBy: { createdAt: 'desc' } }) }
async getChecks(limit = 50) { return this.prisma.contentSafetyCheck.findMany({ orderBy: { createdAt: 'desc' }, take: limit }) }
async getChecks(limit = 50) {
const items = await this.prisma.contentSafetyCheck.findMany({ orderBy: { createdAt: 'desc' }, take: limit });
return enrichWithNames(this.prisma, items);
}
// ── Reports ──