From 1a2556b6fdccf4d09888db7e2451a15db135e41b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 5 May 2021 16:00:15 +0100 Subject: [PATCH] Formatting. --- packages/worker/src/api/controllers/admin/configs.js | 9 ++++++--- packages/worker/src/api/routes/admin/configs.js | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/worker/src/api/controllers/admin/configs.js b/packages/worker/src/api/controllers/admin/configs.js index 0a2e2feccb..0b114a7b0b 100644 --- a/packages/worker/src/api/controllers/admin/configs.js +++ b/packages/worker/src/api/controllers/admin/configs.js @@ -48,9 +48,12 @@ exports.save = async function (ctx) { exports.fetch = async function (ctx) { const db = new CouchDB(GLOBAL_DB) const response = await db.allDocs( - getConfigParams({ type: ctx.params.type }, { - include_docs: true, - }) + getConfigParams( + { type: ctx.params.type }, + { + include_docs: true, + } + ) ) ctx.body = response.rows.map(row => row.doc) } diff --git a/packages/worker/src/api/routes/admin/configs.js b/packages/worker/src/api/routes/admin/configs.js index 1b5150ef27..7bef117a70 100644 --- a/packages/worker/src/api/routes/admin/configs.js +++ b/packages/worker/src/api/routes/admin/configs.js @@ -68,7 +68,11 @@ function buildConfigGetValidation() { router .post("/api/admin/configs", buildConfigSaveValidation(), controller.save) .delete("/api/admin/configs/:id", controller.destroy) - .get("/api/admin/configs/all/:type", buildConfigGetValidation(), controller.fetch) + .get( + "/api/admin/configs/all/:type", + buildConfigGetValidation(), + controller.fetch + ) .get("/api/admin/configs/:type", buildConfigGetValidation(), controller.find) module.exports = router