mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-28 02:00:04 +00:00
FIX: Connection and Network Flows (Create and Delete)
This commit is contained in:
@@ -91,9 +91,9 @@ export class NetworkConfigService {
|
||||
async createNetworkConfig(
|
||||
body: CreateNetworkConfigReq,
|
||||
file: Express.Multer.File,
|
||||
{ customer_name, customer_id },
|
||||
{ customer_name, customer_id, user_id },
|
||||
): Promise<CreateNetworkConfigRes> {
|
||||
const { description, name, network_type_id } = body;
|
||||
const { description, name, network_type_id, network_type_name } = body;
|
||||
let { type, plugin } = body;
|
||||
|
||||
type = type || 'vpn';
|
||||
@@ -102,12 +102,14 @@ export class NetworkConfigService {
|
||||
const OVPN_FILE_STRING = Buffer.from(file.buffer).toString();
|
||||
|
||||
const meta = new Metadata();
|
||||
|
||||
meta.add('customer_id', customer_id);
|
||||
meta.add('customer_name', customer_name);
|
||||
meta.add('user_id', user_id);
|
||||
|
||||
const { network_config } = await lastValueFrom(
|
||||
this.networkConfigWriteClient.NetworkConfigCreate(
|
||||
{
|
||||
customer_name,
|
||||
description,
|
||||
name,
|
||||
properties: JSON.stringify({
|
||||
@@ -116,6 +118,8 @@ export class NetworkConfigService {
|
||||
}),
|
||||
type,
|
||||
network_type_id,
|
||||
network_type_name,
|
||||
plugin,
|
||||
},
|
||||
meta,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user