Compare commits

...

2 Commits

Author SHA1 Message Date
d7ba03749d v2.0.0-beta.6 2021-05-07 10:17:26 +02:00
6c5fc609ae Added URL URLs Normalization
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-05-07 10:16:42 +02:00
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@tcgdex/sdk",
"version": "2.0.0-beta.5",
"version": "2.0.0-beta.6",
"main": "./tcgdex.js",
"types": "./main.d.ts",
"repository": "https://github.com/tcgdex/javascript-sdk.git",

View File

@ -71,6 +71,9 @@ export default class TCGdex {
}
private rwgr<T = any>(...url: Array<string | number>) {
return RequestWrapper.getRequest<T>(`${this.getBaseUrl()}/${url.map((v) => encodeURI(v.toString())).join('/')}`)
return RequestWrapper.getRequest<T>(`${this.getBaseUrl()}/${url.map((v) => encodeURI(
// Normalize URL
v.toString().replace('?', '%3F').normalize('NFC').replace(/["'\u0300-\u036f]/g, "")
)).join('/')}`)
}
}