Formatting.
This commit is contained in:
parent
fe66c3535c
commit
72c3ff8c2e
|
@ -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) {
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue