chore: Move to prettier standard double quotes (#1309)

This commit is contained in:
Tom Moor
2020-06-20 13:59:15 -07:00
committed by GitHub
parent 2a3b9e2104
commit f43deb7940
444 changed files with 5988 additions and 5977 deletions

View File

@ -1,16 +1,16 @@
// @flow
import queryString from 'query-string';
import { type Context } from 'koa';
import queryString from "query-string";
import { type Context } from "koa";
export default function methodOverride() {
return async function methodOverrideMiddleware(
ctx: Context,
next: () => Promise<*>
) {
if (ctx.method === 'POST') {
if (ctx.method === "POST") {
// $FlowFixMe
ctx.body = ctx.request.body;
} else if (ctx.method === 'GET') {
} else if (ctx.method === "GET") {
ctx.method = 'POST'; // eslint-disable-line
ctx.body = queryString.parse(ctx.querystring);
}