Separated GET and POST calls
This commit is contained in:
@ -4,7 +4,7 @@ export default function methodOverride(options) {
|
||||
return async function methodOverrideMiddleware(ctx, next) {
|
||||
if (ctx.method === 'POST') {
|
||||
ctx.body = ctx.request.body;
|
||||
} else {
|
||||
} else if (ctx.method === 'GET') {
|
||||
ctx.method= 'POST';
|
||||
ctx.body = queryString.parse(ctx.querystring);
|
||||
}
|
||||
|
Reference in New Issue
Block a user