Formatting.

This commit is contained in:
mike12345567 2021-06-08 18:06:56 +01:00
parent 8cffe5c9ff
commit 5a9c8daf7b
3 changed files with 16 additions and 4 deletions

View File

@ -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 { Cookies } = require("@budibase/auth").constants
const { getRole } = require("@budibase/auth/roles") const { getRole } = require("@budibase/auth/roles")
const { getGlobalSelf } = require("../utilities/workerRequests") const { getGlobalSelf } = require("../utilities/workerRequests")

View File

@ -18,7 +18,10 @@ const download = require("download")
const env = require("../../environment") const env = require("../../environment")
const { homedir } = require("os") const { homedir } = require("os")
const fetch = require("node-fetch") 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 = const DEFAULT_AUTOMATION_BUCKET =
"https://prod-budi-automations.s3-eu-west-1.amazonaws.com" "https://prod-budi-automations.s3-eu-west-1.amazonaws.com"
@ -120,7 +123,11 @@ exports.performBackup = async (appId, backupName) => {
const instanceDb = new CouchDB(appId) const instanceDb = new CouchDB(appId)
await instanceDb.dump(writeStream, { await instanceDb.dump(writeStream, {
// filter out anything that has a user metadata structure in its ID // 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 // write the file to the object store
await streamUpload( await streamUpload(