get entities

This commit is contained in:
Gabriel Rosa
2022-06-14 14:01:40 -03:00
parent ff663e7166
commit 383741f48c
4 changed files with 37 additions and 4 deletions
+10 -1
View File
@@ -14,7 +14,16 @@ import { InputNewCreateRequest } from '@victorradael/protospack';
@Controller('inputs')
export class InputsController {
constructor(private inputsClientService: InputsClientService) {}
inputService: InputsService;
constructor(private inputsClientService: InputsClientService) {
this.inputService = new InputsService(this.inputsClientService);
}
@Get('available-entities/:plugin')
async getAvailableEntities(@Body() body, @Param() params) {
const { info } = body;
const { plugin } = params;
return await this.inputService.getAvailableEntities({ info, plugin });
}
@Post('/test-connection')
async testConnection(@Body() data) {