mirror of
https://github.com/dadosfera/maestro.git
synced 2026-09-05 14:14:48 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74c27d9637 | ||
|
|
216c83d7fa |
@@ -214,10 +214,18 @@ export class ConnectionClientService implements OnModuleInit {
|
||||
this.INTERNAL_getAllConnections({ customer_name }).then((res) => ({
|
||||
customer_name,
|
||||
customer_id,
|
||||
platformConnections: JSON.parse(res.platformConnections),
|
||||
productConnections: JSON.parse(res.productConnections),
|
||||
productNetworkConfigs: JSON.parse(res.productNetworkConfigs),
|
||||
platformNetworkConfigs: JSON.parse(res.platformNetworkConfigs),
|
||||
platformConnections: res.platformConnections
|
||||
? JSON.parse(res.platformConnections)
|
||||
: [],
|
||||
productConnections: res.productConnections
|
||||
? JSON.parse(res.productConnections)
|
||||
: [],
|
||||
productNetworkConfigs: res.productNetworkConfigs
|
||||
? JSON.parse(res.productNetworkConfigs)
|
||||
: [],
|
||||
platformNetworkConfigs: res.platformNetworkConfigs
|
||||
? JSON.parse(res.platformNetworkConfigs)
|
||||
: [],
|
||||
})),
|
||||
);
|
||||
});
|
||||
@@ -235,20 +243,22 @@ export class ConnectionClientService implements OnModuleInit {
|
||||
customer_id,
|
||||
} = cc;
|
||||
|
||||
platformConnections.forEach((plc) => {
|
||||
const productConnection = productConnections.find(
|
||||
(prc) => prc.id === plc.config_id,
|
||||
);
|
||||
if (!productConnection) productConnectionsMissing.push(plc);
|
||||
});
|
||||
platformConnections &&
|
||||
platformConnections.forEach((plc) => {
|
||||
const productConnection = productConnections.find(
|
||||
(prc) => prc.id === plc.config_id,
|
||||
);
|
||||
if (!productConnection) productConnectionsMissing.push(plc);
|
||||
});
|
||||
|
||||
platformNetworkConfigs.forEach((platNetConfig) => {
|
||||
const productNetworkConfig = productNetworkConfigs.find(
|
||||
(prodNetConfig) => prodNetConfig.id === platNetConfig.config_id,
|
||||
);
|
||||
if (!productNetworkConfig)
|
||||
productNetworkConfigsMissing.push(platNetConfig);
|
||||
});
|
||||
platformNetworkConfigs &&
|
||||
platformNetworkConfigs.forEach((platNetConfig) => {
|
||||
const productNetworkConfig = productNetworkConfigs.find(
|
||||
(prodNetConfig) => prodNetConfig.id === platNetConfig.config_id,
|
||||
);
|
||||
if (!productNetworkConfig)
|
||||
productNetworkConfigsMissing.push(platNetConfig);
|
||||
});
|
||||
|
||||
const updatePromises: Promise<any>[] = [];
|
||||
for (const network_config of productNetworkConfigsMissing) {
|
||||
|
||||
@@ -107,7 +107,7 @@ export class ConnectorController {
|
||||
@Headers('dadosfera-lang') language,
|
||||
@Query() queries: GetAllDto,
|
||||
) {
|
||||
this.logger.info('/upload - Upload Connector Route');
|
||||
this.logger.info('/GET - getAllConnectors Route');
|
||||
if (!language) language = 'en-us';
|
||||
|
||||
const { search, size, page, ...filters } = queries;
|
||||
@@ -120,7 +120,7 @@ export class ConnectorController {
|
||||
page: page || 1,
|
||||
});
|
||||
|
||||
const connectors = JSON.parse(response.connectors).connectors;
|
||||
const connectors = JSON.parse(response.connectors);
|
||||
|
||||
return {
|
||||
message: response.message,
|
||||
@@ -153,7 +153,7 @@ export class ConnectorController {
|
||||
@Param('plugin') plugin: string,
|
||||
@Query('version') version: string,
|
||||
) {
|
||||
this.logger.info('/upload - Upload Connector Route');
|
||||
this.logger.info('/GET/:plugin - getConnector Route');
|
||||
if (!language) language = 'en-us';
|
||||
|
||||
const pluginId = `${plugin}-${version}`;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user