@ovh-api/common
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -14,3 +14,5 @@ "use strict"; | ||
return (id) => { | ||
const child = new OvhProxyApi(target._ovhEngine, `${target._path}/${id}`, `${target._model}/*`); | ||
// escape '/' char | ||
const idStr = String(id).replace(/\//g, '%2F'); | ||
const child = new OvhProxyApi(target._ovhEngine, `${target._path}/${idStr}`, `${target._model}/*`); | ||
return new Proxy(child, handlerChild); | ||
@@ -17,0 +19,0 @@ }; |
@@ -89,4 +89,6 @@ /** | ||
if (key === '$') { | ||
return (id: any) => { | ||
const child = new OvhProxyApi(target._ovhEngine, `${target._path}/${id}`, `${target._model}/*`); | ||
return (id: string | number) => { | ||
// escape '/' char | ||
const idStr = String(id).replace(/\//g, '%2F'); | ||
const child = new OvhProxyApi(target._ovhEngine, `${target._path}/${idStr}`, `${target._model}/*`); | ||
return new Proxy(child, handlerChild); | ||
@@ -93,0 +95,0 @@ } |
{ | ||
"name": "@ovh-api/common", | ||
"description": "common class used to enable Ovh Api new calls Syntax", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "typings": "index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13906
440