mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-08 09:59:08 +00:00
Add change body to query params
This commit is contained in:
@@ -12,10 +12,10 @@ export class ConnectorClientConfiguration {
|
||||
ConnectorManager.ProtoPackages.WritePackage,
|
||||
ConnectorManager.ProtoPackages.ReadPackage,
|
||||
],
|
||||
credentials:
|
||||
process.env.LOCAL_ENV === 'local'
|
||||
? undefined
|
||||
: credentials.createSsl(),
|
||||
credentials: undefined,
|
||||
// process.env.LOCAL_ENV === 'local'
|
||||
// ? undefined
|
||||
// : credentials.createSsl(),
|
||||
protoPath: [
|
||||
ConnectorManager.ProtoPaths.WriteFilePath,
|
||||
ConnectorManager.ProtoPaths.ReadFilePath,
|
||||
|
||||
@@ -5,8 +5,9 @@ import {
|
||||
Get,
|
||||
HttpException,
|
||||
Param,
|
||||
Post,
|
||||
Put,
|
||||
Post,
|
||||
Query,
|
||||
UploadedFile,
|
||||
UseInterceptors,
|
||||
} from '@nestjs/common';
|
||||
@@ -58,14 +59,15 @@ export class ConnectorController {
|
||||
return response;
|
||||
}
|
||||
|
||||
@Post('/all')
|
||||
async getAllConnectors(@Body() body: GetAllDto) {
|
||||
@Get()
|
||||
async getAllConnectors(@Query() queries: GetAllDto) {
|
||||
console.log(`/upload`, 'Upload Connector Route');
|
||||
const { filters, search } = body;
|
||||
|
||||
const { filters, search } = queries;
|
||||
|
||||
const response: any = await this.connectorClientService.getAllConnectors({
|
||||
filters,
|
||||
search,
|
||||
filters: filters || {},
|
||||
search: search || '',
|
||||
});
|
||||
|
||||
const connectors = JSON.parse(response.connectors).connectors;
|
||||
@@ -77,11 +79,16 @@ export class ConnectorController {
|
||||
}
|
||||
|
||||
@Get('/:plugin')
|
||||
async getConnector(@Param('plugin') plugin: string) {
|
||||
async getConnector(
|
||||
@Param('plugin') plugin: string,
|
||||
@Query('version') version: string,
|
||||
) {
|
||||
console.log(`/upload`, 'Upload Connector Route');
|
||||
|
||||
const pluginId = `${plugin}-${version}`;
|
||||
|
||||
const response: any = await this.connectorClientService.getConnector(
|
||||
plugin,
|
||||
pluginId,
|
||||
);
|
||||
|
||||
return {
|
||||
@@ -91,11 +98,16 @@ export class ConnectorController {
|
||||
}
|
||||
|
||||
@Get('/:plugin/details')
|
||||
async getConnectorDetails(@Param('plugin') plugin: string) {
|
||||
async getConnectorDetails(
|
||||
@Param('plugin') plugin: string,
|
||||
@Query('version') version: string,
|
||||
) {
|
||||
console.log(`/upload`, 'Upload Connector Route');
|
||||
|
||||
const pluginId = `${plugin}-${version}`;
|
||||
|
||||
const response: any = await this.connectorClientService.getConnectorDetails(
|
||||
plugin,
|
||||
pluginId,
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
@@ -4,6 +4,9 @@ export class UpdateDto {
|
||||
@ApiProperty({ format: 'binary', required: false })
|
||||
file?: string;
|
||||
|
||||
@ApiProperty()
|
||||
version: string;
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
category?: string;
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user