Fixed 267U.pre2
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export async function NormalizeQueryMiddleware(ctx, next) {
|
||||
if (ctx.request.query) {
|
||||
if (!ctx.request.body || Object.keys(ctx.request.body).length === 0) {
|
||||
ctx.request.body = ctx.request.query;
|
||||
} else {
|
||||
ctx.request.body = {
|
||||
...ctx.request.body,
|
||||
...ctx.request.query
|
||||
};
|
||||
}
|
||||
}
|
||||
await next();
|
||||
}
|
||||
Reference in New Issue
Block a user