feat: 手动安装插件时增加对{BACKEND}的处理

pull/81/head
moonrailgun 3 years ago
parent ea8902ec29
commit be6983b591

@ -1,4 +1,4 @@
import { isValidJson, PluginManifest, t } from 'tailchat-shared'; import { isValidJson, parseUrlStr, PluginManifest, t } from 'tailchat-shared';
import { Validator } from 'jsonschema'; import { Validator } from 'jsonschema';
/** /**
@ -36,5 +36,8 @@ export function parsePluginManifest(json: string): PluginManifest {
throw new Error(t('不是一个合法的插件配置')); throw new Error(t('不是一个合法的插件配置'));
} }
// 后端url策略。根据前端的url在获取时自动变更为当前链接的后端地址
obj.url = parseUrlStr(obj.url);
return obj; return obj;
} }

Loading…
Cancel
Save