fix(extensions): 内容审核管理端测试可绕过启用开关
后台测试此前受 content_audit_enabled/text_enabled 与 on_failure=allow 短路,未启用时恒为通过;强制 live 调用并返回可读失败原因。
This commit is contained in:
1 parent
3675b7dcef
commit
ab9bb9a145
3 files changed
+90
-10
No files matched your search
@@ -235,10 +235,16 @@ async function handleTestIp() {
|
||||
|
||||
async function handleTestAudit() {
|
||||
auditTest.value.loading = true
|
||||
auditTest.value.result = ''
|
||||
try {
|
||||
const res = await api.testContentAudit(auditTest.value.text)
|
||||
auditTest.value.result = JSON.stringify(res?.data || {}, null, 2)
|
||||
message.success('内容审核测试完成')
|
||||
const res = await api.testContentAudit(String(auditTest.value.text || '').trim())
|
||||
const data = res?.data || {}
|
||||
auditTest.value.result = JSON.stringify(data, null, 2)
|
||||
if (data.ok) {
|
||||
message.success(data.message || '内容审核测试完成')
|
||||
} else {
|
||||
message.warning(data.message || '内容审核未通过或配置异常')
|
||||
}
|
||||
} catch (err) {
|
||||
message.error(err?.message || '内容审核测试失败')
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user