Removing try catch wrap.
This commit is contained in:
parent
52d8d7d1dc
commit
e7f42a0075
|
@ -119,23 +119,19 @@ export function areRESTVariablesValid(datasource: Datasource) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function checkDatasourceTypes(schema: Integration, config: any) {
|
export function checkDatasourceTypes(schema: Integration, config: any) {
|
||||||
try {
|
for (let key of Object.keys(config)) {
|
||||||
for (let key of Object.keys(config)) {
|
if (!schema.datasource?.[key]) {
|
||||||
if (!schema.datasource?.[key]) {
|
continue
|
||||||
continue
|
}
|
||||||
}
|
const type = schema.datasource[key].type
|
||||||
const type = schema.datasource[key].type
|
if (
|
||||||
if (
|
type === DatasourceFieldType.NUMBER &&
|
||||||
type === DatasourceFieldType.NUMBER &&
|
typeof config[key] === "string"
|
||||||
typeof config[key] === "string"
|
) {
|
||||||
) {
|
config[key] = parseFloat(config[key])
|
||||||
config[key] = parseFloat(config[key])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return config
|
|
||||||
} catch (err) {
|
|
||||||
console.log(err)
|
|
||||||
}
|
}
|
||||||
|
return config
|
||||||
}
|
}
|
||||||
|
|
||||||
async function enrichDatasourceWithValues(
|
async function enrichDatasourceWithValues(
|
||||||
|
|
Loading…
Reference in New Issue