From fc9faaaf22bbcd267c632d8322c665f7046cef2f Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Mon, 23 Jan 2017 01:16:18 +0300 Subject: [PATCH] route pages eslinted --- src/routes/pages.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/routes/pages.js b/src/routes/pages.js index f6cec2fc..eb2f671c 100644 --- a/src/routes/pages.js +++ b/src/routes/pages.js @@ -1,14 +1,14 @@ -import route from 'koa-route'; -import {c} from '../core/db'; -import {accepts, index} from './'; +import route from 'koa-route' +import {c} from '../core/db' +import {accepts, index} from './' async function exists(ctx) { - const page = await getPage(ctx.path); - return Boolean(page); + const page = await getPage(ctx.path) + return Boolean(page) } async function getPage(path) { - return await c('pages').findOne({url: path}); + return await c('pages').findOne({url: path}) } export default function () { @@ -16,9 +16,9 @@ export default function () { 'text/html': index(exists), 'text/plain': index(exists), 'application/json': async(ctx) => { - const page = await getPage(ctx.path); - if (!page) ctx.status = 404; - else ctx.body = page; + const page = await getPage(ctx.path) + if (!page) ctx.status = 404 + else ctx.body = page } })) };