mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-22 14:59:08 +00:00
Merge branch 'alpha' of https://github.com/dadosfera/maestro into alpha
This commit is contained in:
@@ -148,12 +148,11 @@ export class InputsClientService implements OnModuleInit {
|
||||
}
|
||||
|
||||
async testConnection(data: ITestConnectionRequest) {
|
||||
console.log('InputClientService', 'TestCOnnection');
|
||||
|
||||
console.log('InputClientService', 'TestConnection');
|
||||
const testConnectionResponse = await new Promise((resolve, reject) => {
|
||||
this.inputService.TestConnection(data).subscribe({
|
||||
this.inputService.TestConnection(objectSnakeToCamel(data)).subscribe({
|
||||
next(x) {
|
||||
resolve(x);
|
||||
resolve(objectCamelToSnake(x));
|
||||
},
|
||||
error(err) {
|
||||
console.log('Observable Error');
|
||||
|
||||
@@ -18,12 +18,10 @@ import {
|
||||
export class InputsController {
|
||||
constructor(private inputsClientService: InputsClientService) {}
|
||||
|
||||
@Get('/test-connection')
|
||||
@Post('/test-connection')
|
||||
async testConnection(@Body() data) {
|
||||
console.log(`/test-connection`, 'ON TEST CONNECTION ROUTE');
|
||||
|
||||
console.log(data);
|
||||
|
||||
const inputService = new InputsService(this.inputsClientService);
|
||||
const response = await inputService.testConnection(data);
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ export const objectSnakeToCamel = (object) => {
|
||||
delete object[key];
|
||||
}
|
||||
});
|
||||
|
||||
objectValues.forEach((value) => {
|
||||
if (value == null) return;
|
||||
if (typeof value === 'object') {
|
||||
objectSnakeToCamel(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user