mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-17 23:05:20 +00:00
refac: external tool validation
This commit is contained in:
parent
2e75c6dbdf
commit
39675434f6
1 changed files with 10 additions and 3 deletions
|
|
@ -98,10 +98,17 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path === '') {
|
if (['openapi', ''].includes(type)) {
|
||||||
|
if (spec_type === 'json' && spec === '') {
|
||||||
|
toast.error($i18n.t('Please enter a valid JSON spec'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (spec_type === 'url' && path === '') {
|
||||||
toast.error($i18n.t('Please enter a valid path'));
|
toast.error($i18n.t('Please enter a valid path'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (direct) {
|
if (direct) {
|
||||||
const res = await getToolServerData(
|
const res = await getToolServerData(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue