From 72c3ff8c2edccf1d8cc1635869a23eeb39dd396a Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 8 Jun 2021 18:06:56 +0100 Subject: [PATCH] Formatting. --- packages/auth/src/db/utils.js | 2 +- packages/server/src/middleware/currentapp.js | 7 ++++++- packages/server/src/utilities/fileSystem/index.js | 11 +++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/auth/src/db/utils.js b/packages/auth/src/db/utils.js index 3fbf234db6..100dc005c8 100644 --- a/packages/auth/src/db/utils.js +++ b/packages/auth/src/db/utils.js @@ -198,7 +198,7 @@ exports.getAllApps = async ({ CouchDB, dev, all } = {}) => { exports.dbExists = async (CouchDB, dbName) => { let exists = false try { - const db = CouchDB(dbName, {skip_setup: true}) + const db = CouchDB(dbName, { skip_setup: true }) // check if database exists const info = await db.info() if (info && !info.error) { diff --git a/packages/server/src/middleware/currentapp.js b/packages/server/src/middleware/currentapp.js index 7d4f948731..19d0afd560 100644 --- a/packages/server/src/middleware/currentapp.js +++ b/packages/server/src/middleware/currentapp.js @@ -1,4 +1,9 @@ -const { getAppId, setCookie, getCookie, clearCookie } = require("@budibase/auth").utils +const { + getAppId, + setCookie, + getCookie, + clearCookie, +} = require("@budibase/auth").utils const { Cookies } = require("@budibase/auth").constants const { getRole } = require("@budibase/auth/roles") const { getGlobalSelf } = require("../utilities/workerRequests") diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index c80b9ea08d..ddda274ef5 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -18,7 +18,10 @@ const download = require("download") const env = require("../../environment") const { homedir } = require("os") const fetch = require("node-fetch") -const { USER_METDATA_PREFIX, LINK_USER_METADATA_PREFIX } = require("../../db/utils") +const { + USER_METDATA_PREFIX, + LINK_USER_METADATA_PREFIX, +} = require("../../db/utils") const DEFAULT_AUTOMATION_BUCKET = "https://prod-budi-automations.s3-eu-west-1.amazonaws.com" @@ -120,7 +123,11 @@ exports.performBackup = async (appId, backupName) => { const instanceDb = new CouchDB(appId) await instanceDb.dump(writeStream, { // filter out anything that has a user metadata structure in its ID - filter: doc => !(doc._id.includes(USER_METDATA_PREFIX) || doc.includes(LINK_USER_METADATA_PREFIX)) + filter: doc => + !( + doc._id.includes(USER_METDATA_PREFIX) || + doc.includes(LINK_USER_METADATA_PREFIX) + ), }) // write the file to the object store await streamUpload(