Просмотр исходного кода

Fix endpoint duplicate issue

Fixes an issue where invalid data was sent to the API when trying to
duplicate an endpoint.
Sergiu Miclea 5 лет назад
Родитель
Сommit
fa742514fa
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/sources/EndpointSource.ts

+ 1 - 1
src/sources/EndpointSource.ts

@@ -210,7 +210,7 @@ class EndpointSource {
 
 
   async add(endpoint: Endpoint, skipSchemaParser: boolean = false): Promise<Endpoint> {
   async add(endpoint: Endpoint, skipSchemaParser: boolean = false): Promise<Endpoint> {
     const parsedConnectionInfo: any = skipSchemaParser
     const parsedConnectionInfo: any = skipSchemaParser
-      ? { ...endpoint } : SchemaParser.connectionInfoToPayload(endpoint)
+      ? { ...endpoint.connection_info } : SchemaParser.connectionInfoToPayload(endpoint)
     let newEndpoint: any = {}
     let newEndpoint: any = {}
     let connectionInfo: any = {}
     let connectionInfo: any = {}
     if (configLoader.config.useBarbicanSecrets
     if (configLoader.config.useBarbicanSecrets