refactor(errors): migrate decisions to {code,msg}
This commit is contained in:
@@ -112,7 +112,7 @@ export default function DisputePage({ params }: { params: Promise<{ id: string }
|
||||
evidence: files,
|
||||
})
|
||||
if (!result.decision.ok) {
|
||||
notifyInfo(result.decision.message ?? "提交争议失败")
|
||||
notifyInfo(result.decision.error.msg)
|
||||
return
|
||||
}
|
||||
router.replace(`/dispute/${id}?submitted=1`)
|
||||
@@ -288,7 +288,7 @@ export default function DisputePage({ params }: { params: Promise<{ id: string }
|
||||
evidence: responseFiles,
|
||||
})
|
||||
if (!decision.ok) {
|
||||
notifyInfo(decision.message ?? "提交回应失败")
|
||||
notifyInfo(decision.error.msg)
|
||||
}
|
||||
}}
|
||||
disabled={!responseReason.trim()}
|
||||
@@ -336,7 +336,7 @@ export default function DisputePage({ params }: { params: Promise<{ id: string }
|
||||
reason: appealReason,
|
||||
})
|
||||
if (!decision.ok) {
|
||||
notifyInfo(decision.message ?? "提交申诉失败")
|
||||
notifyInfo(decision.error.msg)
|
||||
}
|
||||
}}
|
||||
disabled={!appealReason.trim()}
|
||||
|
||||
Reference in New Issue
Block a user