chore: Upgrade Prettier 1.8 -> 2.0 (#1436)

This commit is contained in:
Tom Moor
2020-08-08 18:53:11 -07:00
committed by GitHub
parent 68dcb4de5f
commit e312b264a6
218 changed files with 1156 additions and 1169 deletions

View File

@ -19,10 +19,8 @@ const Op = Sequelize.Op;
const router = new Router();
// start the oauth process and redirect user to Slack
router.get("slack", async ctx => {
const state = Math.random()
.toString(36)
.substring(7);
router.get("slack", async (ctx) => {
const state = Math.random().toString(36).substring(7);
ctx.cookies.set("state", state, {
httpOnly: false,
@ -33,7 +31,7 @@ router.get("slack", async ctx => {
});
// signin callback from Slack
router.get("slack.callback", auth({ required: false }), async ctx => {
router.get("slack.callback", auth({ required: false }), async (ctx) => {
const { code, error, state } = ctx.request.query;
ctx.assertPresent(code || error, "code is required");
ctx.assertPresent(state, "state is required");
@ -142,7 +140,7 @@ router.get("slack.callback", auth({ required: false }), async ctx => {
}
});
router.get("slack.commands", auth({ required: false }), async ctx => {
router.get("slack.commands", auth({ required: false }), async (ctx) => {
const { code, state, error } = ctx.request.query;
const user = ctx.state.user;
ctx.assertPresent(code || error, "code is required");
@ -194,7 +192,7 @@ router.get("slack.commands", auth({ required: false }), async ctx => {
ctx.redirect("/settings/integrations/slack");
});
router.get("slack.post", auth({ required: false }), async ctx => {
router.get("slack.post", auth({ required: false }), async (ctx) => {
const { code, error, state } = ctx.request.query;
const user = ctx.state.user;
ctx.assertPresent(code || error, "code is required");