🔧 Fixed params destructuring
This commit is contained in:
14
package-lock.json
generated
14
package-lock.json
generated
@@ -32,7 +32,7 @@
|
||||
"jest": "^25.1.0",
|
||||
"jest-cli": "^25.1.0",
|
||||
"moleculer-repl": "^0.6.2",
|
||||
"threetwo-ui-typings": "^1.0.9",
|
||||
"threetwo-ui-typings": "^1.0.10",
|
||||
"ts-jest": "^25.3.0",
|
||||
"ts-node": "^8.8.1"
|
||||
},
|
||||
@@ -10610,9 +10610,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/threetwo-ui-typings": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.9.tgz",
|
||||
"integrity": "sha512-zOxDtVfe7Z8vSo0XsOBjT2F4WrBRVfL6ooQ82P/oor1UENZfBnBKj6aKsJT8/zINfvS/GZM96F8q8V1f2YrpCw==",
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.10.tgz",
|
||||
"integrity": "sha512-4FKd/Oq6wVgQZmgFErZ4/zIjp+T3UbV9zkVbgTqSyCsIu9MPXKAgHvfZaiV7TU05MCjuiaPJ+9XuUjtBrP6ixQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"typescript": "^4.3.2"
|
||||
@@ -19698,9 +19698,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"threetwo-ui-typings": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.9.tgz",
|
||||
"integrity": "sha512-zOxDtVfe7Z8vSo0XsOBjT2F4WrBRVfL6ooQ82P/oor1UENZfBnBKj6aKsJT8/zINfvS/GZM96F8q8V1f2YrpCw==",
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/threetwo-ui-typings/-/threetwo-ui-typings-1.0.10.tgz",
|
||||
"integrity": "sha512-4FKd/Oq6wVgQZmgFErZ4/zIjp+T3UbV9zkVbgTqSyCsIu9MPXKAgHvfZaiV7TU05MCjuiaPJ+9XuUjtBrP6ixQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"typescript": "^4.3.2"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"jest": "^25.1.0",
|
||||
"jest-cli": "^25.1.0",
|
||||
"moleculer-repl": "^0.6.2",
|
||||
"threetwo-ui-typings": "^1.0.9",
|
||||
"threetwo-ui-typings": "^1.0.10",
|
||||
"ts-jest": "^25.3.0",
|
||||
"ts-node": "^8.8.1"
|
||||
},
|
||||
|
||||
@@ -41,13 +41,22 @@ export default class ComicVineService extends Service {
|
||||
};
|
||||
}>
|
||||
): Promise<any> => {
|
||||
const { format, sort, query, fieldList, limit, offset, resources } = ctx.params;
|
||||
const response = await axios.request({
|
||||
url:
|
||||
CV_BASE_URL +
|
||||
"search" +
|
||||
"?api_key=" +
|
||||
CV_API_KEY,
|
||||
params: ctx.params,
|
||||
params: {
|
||||
format,
|
||||
sort,
|
||||
query,
|
||||
fieldList,
|
||||
limit,
|
||||
offset,
|
||||
resources,
|
||||
},
|
||||
transformResponse: (r) => {
|
||||
const matches = JSON.parse(r);
|
||||
return matchScorer(
|
||||
|
||||
Reference in New Issue
Block a user