mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
fix: request 参数丢失问题
This commit is contained in:
parent
1838047624
commit
cb69a05f29
@ -3,9 +3,9 @@ import { checkHttpRequestHasBody, trimObj } from './helpers';
|
|||||||
export default async (ctx, next) => {
|
export default async (ctx, next) => {
|
||||||
const config = ctx.config;
|
const config = ctx.config;
|
||||||
if (checkHttpRequestHasBody(config.method)) {
|
if (checkHttpRequestHasBody(config.method)) {
|
||||||
config.data = trimObj(config.data);
|
trimObj(config.data);
|
||||||
} else {
|
} else {
|
||||||
config.params = trimObj(config.params);
|
trimObj(config.params);
|
||||||
}
|
}
|
||||||
await next();
|
await next();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user