FIX: Connection and Network Flows (Create and Delete)

This commit is contained in:
Victor Radael
2022-08-17 15:58:00 -03:00
parent 6807b3e1a9
commit a9f68b87ca
6 changed files with 59 additions and 64 deletions
@@ -91,19 +91,21 @@ export class NetworkConfigController {
@Post()
@ApiOkResponse({ type: CreateNetworkConfigRes })
@ApiConsumes('multipart/form-data')
@UseInterceptors(FileInterceptor('OVPN_FILE'))
@UseInterceptors(FileInterceptor('ovpn_file'))
async createNetworkConfigs(
@User() user: RequestUser,
@Body() body: CreateNetworkConfigReq,
@UploadedFile() file: Express.Multer.File,
@Body() body: CreateNetworkConfigReq,
) {
this.logger.info('POST /network-config', {
user: user.user_id,
customer: user.customer_name,
});
const { customer_id, customer_name, user_id } = user;
return this.networkConfigService.createNetworkConfig(body, file, {
customer_name: user.customer_name,
customer_id: user.customer_id,
customer_name,
customer_id,
user_id,
});
}