From 97bb1e209d3ff8331957c5572f9fcd20f60380fa Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 18 Dec 2020 12:55:01 +0000 Subject: [PATCH] Linting. --- packages/worker/src/api/controllers/deploy.js | 32 +++++++++++-------- packages/worker/src/api/routes/deploy.js | 3 +- packages/worker/src/api/routes/index.js | 4 +-- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/packages/worker/src/api/controllers/deploy.js b/packages/worker/src/api/controllers/deploy.js index e2cf3f6a6e..ad10cc2aae 100644 --- a/packages/worker/src/api/controllers/deploy.js +++ b/packages/worker/src/api/controllers/deploy.js @@ -13,8 +13,8 @@ const PUBLIC_READ_POLICY = { Principal: "*", Action: "s3:GetObject", Resource: `arn:aws:s3:::${APP_BUCKET}/*`, - } - ] + }, + ], } async function getCouchSession() { @@ -25,7 +25,7 @@ async function getCouchSession() { json: { username: env.COUCH_DB_USERNAME, password: env.COUCH_DB_PASSWORD, - } + }, }) const cookie = session.headers["set-cookie"][0] @@ -50,19 +50,25 @@ async function getMinioSession() { }) // make sure the bucket exists try { - await objClient.headBucket({ - Bucket: APP_BUCKET - }).promise() - await objClient.putBucketPolicy({ - Bucket: APP_BUCKET, - Policy: JSON.stringify(PUBLIC_READ_POLICY), - }).promise() + await objClient + .headBucket({ + Bucket: APP_BUCKET, + }) + .promise() + await objClient + .putBucketPolicy({ + Bucket: APP_BUCKET, + Policy: JSON.stringify(PUBLIC_READ_POLICY), + }) + .promise() } catch (err) { // bucket doesn't exist create it if (err.statusCode === 404) { - await objClient.createBucket({ - Bucket: APP_BUCKET, - }).promise() + await objClient + .createBucket({ + Bucket: APP_BUCKET, + }) + .promise() } else { throw err } diff --git a/packages/worker/src/api/routes/deploy.js b/packages/worker/src/api/routes/deploy.js index 2f1f1505f9..97c5439752 100644 --- a/packages/worker/src/api/routes/deploy.js +++ b/packages/worker/src/api/routes/deploy.js @@ -4,7 +4,6 @@ const checkKey = require("../../middleware/check-key") const router = Router() -router - .post("/api/deploy", checkKey, controller.deploy) +router.post("/api/deploy", checkKey, controller.deploy) module.exports = router diff --git a/packages/worker/src/api/routes/index.js b/packages/worker/src/api/routes/index.js index 5fcc4cda07..3b4455cef9 100644 --- a/packages/worker/src/api/routes/index.js +++ b/packages/worker/src/api/routes/index.js @@ -1,5 +1,3 @@ const deployRoutes = require("./deploy") -exports.routes = [ - deployRoutes, -] \ No newline at end of file +exports.routes = [deployRoutes]