fix: Fix export flow error (#1994)

Co-authored-by: 谨欣 <echo.cmy@antgroup.com>
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
This commit is contained in:
Dreammy23
2024-09-10 16:14:30 +08:00
committed by GitHub
parent e101c89a66
commit 66d32461dc
56 changed files with 52 additions and 52 deletions

View File

@@ -32,7 +32,7 @@ export const ExportFlowModal: React.FC<Props> = ({
a.download = values.file_name || 'flow.json';
a.click();
} else {
const linkUrl = `${process.env.API_BASE_URL}/api/v2/serve/awel/flow/export/${values.uid}?export_type=${values.export_type}&format=${values.format}`;
const linkUrl = `${process.env.API_BASE_URL ?? ''}/api/v2/serve/awel/flow/export/${values.uid}?export_type=${values.export_type}&format=${values.format}`;
window.open(linkUrl);
}
messageApi.success(t('Export_Flow_Success'));

View File

@@ -77,7 +77,7 @@ export const renderUpload = (params: Props) => {
const props: UploadProps = {
name: 'files',
action: process.env.API_BASE_URL + data.ui.action,
action: process.env.API_BASE_URL ?? '' + data.ui.action,
headers: {
authorization: 'authorization-text',
},