...
|
...
|
@@ -24,6 +24,7 @@ module.exports = () => { |
|
|
const reqParams = Object.assign({}, req.query, req.body, baseParams);
|
|
|
const params = checkParams.getParams(reqParams, apiInfo);
|
|
|
const cache = req.method.toLowerCase() !== 'get' ? false : apiInfo.cache;
|
|
|
let method = req.method.toLowerCase() === 'post' ? 'post' : 'get';
|
|
|
|
|
|
let result;
|
|
|
|
...
|
...
|
@@ -33,7 +34,7 @@ module.exports = () => { |
|
|
code: 200
|
|
|
});
|
|
|
} else {
|
|
|
result = await api[req.method.toLowerCase()]('', params, {
|
|
|
result = await api[method]('', params, {
|
|
|
code: 200,
|
|
|
cache: cache
|
|
|
});
|
...
|
...
|
|