File tree Expand file tree Collapse file tree
packages/basic/src/utils/create Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,13 +158,18 @@ function download(url) {
158158}
159159
160160function formatCallConnectorPath ( path : string , connectionName : string ) : string {
161+ const sysPrefixPath = window . appInfo ?. sysPrefixPath ;
162+ if ( sysPrefixPath ) {
163+ path = path ?. replace ( sysPrefixPath , "" ) ;
164+ }
165+
161166 // /api/connectors/connector1/namespace1/getA
162167 const pathItemList = ( path || '' ) . split ( '/' ) . filter ( ( i ) => i ) ;
163168 if ( pathItemList . length < 3 ) {
164169 throw Error ( 'unexpected path when use CallConnector' ) ;
165170 }
166171 const [ prefix1 , prefix2 , connectorName , ...rt ] = pathItemList ;
167- return `/${ prefix1 } /${ prefix2 } /${ connectorName } /${ connectionName } /${ rt . join ( '/' ) } ` ;
172+ return `${ sysPrefixPath ? sysPrefixPath : "" } /${ prefix1 } /${ prefix2 } /${ connectorName } /${ connectionName } /${ rt . join ( '/' ) } ` ;
168173}
169174
170175export function genBaseOptions ( requestInfo ) {
You can’t perform that action at this time.
0 commit comments