File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
backend/src/helpers/parsers Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -147,12 +147,15 @@ export const parseTestIbmDB2ConnectionString = (connectionString: string): Parti
147147
148148// dynamodb://accessKeyId:secretAccessKey@localhost :8000/
149149export const parseTestDynamoDBConnectionString = ( connectionString : string ) : Partial < CreateConnectionDto > => {
150- const url = new URL ( connectionString ) ;
150+ const modifiedConnectionString = connectionString . replace ( 'dynamodb://' , '' ) ;
151+ const [ credentials , nestedUrl ] = modifiedConnectionString . split ( '@' ) ;
152+ const [ username , password ] = credentials . split ( ':' ) ;
153+ const url = new URL ( nestedUrl ) ;
151154 const config : Partial < CreateConnectionDto > = { } ;
152-
153- config . username = url . username || null ;
154- config . password = url . password || null ;
155- config . host = url . hostname || null ;
155+ config . username = username || null ;
156+ config . password = password || null ;
157+ const host = ` ${ url . protocol } // ${ url . hostname } : ${ url . port } ` ;
158+ config . host = host ;
156159 config . type = ConnectionTypesEnum . dynamodb ;
157160 config . title = 'DynamoDB' ;
158161 config . isTestConnection = true ;
You can’t perform that action at this time.
0 commit comments