refactor: 移除冗余中间类型和不必要代码
- 移除 ScheduledTestOutcome 中间类型,RunTestBackground 直接返回 *ScheduledTestResult - 简化 SaveResult 直接接受 *ScheduledTestResult - 移除 handler 中不必要的 nil 检查 - 移除前端 ScheduledTestsPanel 中多余的 String() 转换 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -469,8 +469,8 @@ const handleCreate = async () => {
|
||||
const maxResults = Number(newPlan.max_results) || 100
|
||||
await adminAPI.scheduledTests.create({
|
||||
account_id: props.accountId,
|
||||
model_id: String(newPlan.model_id),
|
||||
cron_expression: String(newPlan.cron_expression),
|
||||
model_id: newPlan.model_id,
|
||||
cron_expression: newPlan.cron_expression,
|
||||
enabled: newPlan.enabled,
|
||||
max_results: maxResults
|
||||
})
|
||||
@@ -515,8 +515,8 @@ const handleEdit = async () => {
|
||||
updating.value = true
|
||||
try {
|
||||
const updated = await adminAPI.scheduledTests.update(editingPlanId.value, {
|
||||
model_id: String(editForm.model_id),
|
||||
cron_expression: String(editForm.cron_expression),
|
||||
model_id: editForm.model_id,
|
||||
cron_expression: editForm.cron_expression,
|
||||
max_results: Number(editForm.max_results) || 100,
|
||||
enabled: editForm.enabled
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user