@ovh-api/common
Advanced tools
Comparing version 3.1.0 to 3.1.1
12
index.js
@@ -12,5 +12,5 @@ "use strict"; | ||
// give parameter in path | ||
if (key == '$') { | ||
if (key === '$') { | ||
return (id) => { | ||
const child = new OvhProxyApi(target._ovhEngine, `${target._path}/${id}`, `${target._path}/*`); | ||
const child = new OvhProxyApi(target._ovhEngine, `${target._path}/${id}`, `${target._model}/*`); | ||
return new Proxy(child, handlerChild); | ||
@@ -34,3 +34,3 @@ }; | ||
key = key.substring(1); | ||
const child = new OvhProxyApi(target._ovhEngine, `${target._path}/${key}`); | ||
const child = new OvhProxyApi(target._ovhEngine, `${target._path}/${key}`, `${target._model}/${key}`); | ||
return new Proxy(child, handlerChild); | ||
@@ -51,3 +51,3 @@ }; | ||
get(target, p, receiver) { | ||
if (typeof p == 'symbol') | ||
if (typeof p === 'symbol') | ||
return target[p]; | ||
@@ -81,3 +81,3 @@ const key = p.toString(); | ||
get(target, p, receiver) { | ||
if (typeof p == 'symbol') | ||
if (typeof p === 'symbol') | ||
return target[p]; | ||
@@ -130,4 +130,2 @@ let key = p.toString(); | ||
constructor(ovhEngine, path, model) { | ||
this._path = ''; | ||
this._model = ''; | ||
this._ovhEngine = ovhEngine; | ||
@@ -134,0 +132,0 @@ this._path = path; |
{ | ||
"name": "@ovh-api/common", | ||
"description": "common class used to enable Ovh Api new calls Syntax", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"main": "index.js", | ||
@@ -24,4 +24,5 @@ "typings": "index.d.ts", | ||
"index.js", | ||
"index.ts", | ||
"index.d.ts" | ||
] | ||
} |
13690
5
436