mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
refac: external tool validation
This commit is contained in:
@@ -98,9 +98,16 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (path === '') {
|
||||
toast.error($i18n.t('Please enter a valid path'));
|
||||
return;
|
||||
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'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (direct) {
|
||||
|
||||
Reference in New Issue
Block a user