feat(ability): enhance FixAbility function

This commit is contained in:
CaIon
2025-07-08 18:33:32 +08:00
parent 4e974daa8d
commit beb6ea96d2
5 changed files with 43 additions and 68 deletions
+2 -2
View File
@@ -1461,9 +1461,9 @@ const ChannelsTable = () => {
const fixChannelsAbilities = async () => {
const res = await API.post(`/api/channel/fix`);
const { success, message, data } = res.data;
const { success, message, data } = res.data;
if (success) {
showSuccess(t('已修复 ${data} 个通道!').replace('${data}', data));
showSuccess(t('已修复 ${success} 个通道,失败 ${fails} 个通道。').replace('${success}', data.success).replace('${fails}', data.fails));
await refresh();
} else {
showError(message);
+1 -1
View File
@@ -240,7 +240,7 @@ const EditChannel = (props) => {
if (isEdit) {
// 如果是编辑模式,使用已有的channel id获取模型列表
const res = await API.get('/api/channel/fetch_models/' + channelId);
if (res.data && res.data?.success) {
if (res.data && res.data.success) {
models.push(...res.data.data);
} else {
err = true;