fix: optionally use allowed_query

This commit is contained in:
Paul Makles
2022-04-21 15:14:06 +01:00
parent ed75d007cd
commit cd9b81b812
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
"typescript": "^4.6.2"
},
"dependencies": {
"@insertish/oapi": "0.1.14",
"@insertish/oapi": "0.1.15",
"axios": "^0.26.1",
"lodash.defaultsdeep": "^4.6.1"
},
+1 -1
View File
@@ -138,7 +138,7 @@ export class API {
// Map each parameter to the correct object.
for (const parameter of Object.keys(params)) {
if (allowed_query.includes(parameter)) {
if (allowed_query?.includes(parameter)) {
query = {
...(query ?? {}),
[parameter]: (params as Record<any, any>)[parameter]
+4 -4
View File
@@ -2,10 +2,10 @@
# yarn lockfile v1
"@insertish/oapi@0.1.14":
version "0.1.14"
resolved "https://registry.yarnpkg.com/@insertish/oapi/-/oapi-0.1.14.tgz#0eb78530990a03bd8f3bbb7e9f4ee598b5cd5d6f"
integrity sha512-9GW6tCo/aEG8VG4ICX1s+lN0bmJibEHuEn8Ij58N9VbbJpsQl0sWzCLJVIKHOK4UxKY/25fb08CoMqqgUTDfow==
"@insertish/oapi@0.1.15":
version "0.1.15"
resolved "https://registry.yarnpkg.com/@insertish/oapi/-/oapi-0.1.15.tgz#ee58b82d879ed5af54db846699941b8ad0262e7b"
integrity sha512-2G8eFxrojF651tBoRutQ8CJOw0u8UjYSlw/LQU+xycw5KpXslhWp/KSR86uIFyDIPddwfMCNA91vwHGCFRA63w==
dependencies:
typescript "^4.6.2"
optionalDependencies: