1
0
Fork 0
mirror of synced 2024-10-01 09:38:55 +13:00

Only development apps.

This commit is contained in:
mike12345567 2021-09-30 12:50:22 +01:00
parent f8562015ac
commit e1707111b2

View file

@ -9,7 +9,7 @@ const {
const { stringToReadStream } = require("../../utilities")
const { getGlobalDBName, getGlobalDB } = require("@budibase/auth/tenancy")
const { create } = require("./application")
const { getDocParams, DocumentTypes } = require("../../db/utils")
const { getDocParams, DocumentTypes, isDevAppID } = require("../../db/utils")
async function createApp(appName, appImport) {
const ctx = {
@ -33,7 +33,11 @@ exports.exportApps = async ctx => {
global: globalDBString,
}
for (let app of apps) {
allDBs[app.name] = await exportDB(app._id)
// only export the dev apps as they will be the latest, the user can republish the apps
// in their self hosted environment
if (isDevAppID(app._id)) {
allDBs[app.name] = await exportDB(app._id)
}
}
const filename = `cloud-export-${new Date().getTime()}.txt`
ctx.attachment(filename)