From 978cd9937af88cbdbf21076c3ee649bdd5c77a97 Mon Sep 17 00:00:00 2001 From: MobilizeTI <67709040+MobilizeTI@users.noreply.github.com> Date: Sun, 8 Sep 2024 13:10:16 -0300 Subject: [PATCH] [IMP] Make safe xmlrpc client optional in constructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hola quisiera contribuir con el desarollo de esta librería. Acá un pequeño cambio para trabajar en entornos locales. Felicitaciones por la iniciativa!!! --- src/controllers/odoo.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/controllers/odoo.ts b/src/controllers/odoo.ts index 6fea994..5b0d949 100755 --- a/src/controllers/odoo.ts +++ b/src/controllers/odoo.ts @@ -19,11 +19,12 @@ export class Odoo { private _db: string; private _password: string; - constructor(host: string, port = 443) { - this._client = createSecureClient({ + constructor(host: string, port = 443, secure: boolean = false) { + this._client = secure ? createSecureClient({ host: host, port: port - }); + }) : createClient({ host: host, port: port }) + } private _commonPath() {