1
0
Fork 0
mirror of synced 2024-06-27 18:40:42 +12:00

Only development apps.

This commit is contained in:
mike12345567 2021-09-30 12:50:22 +01:00
parent 7de9ed2fdf
commit 8e7ee8f23e

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)