1
0
Fork 0
mirror of synced 2024-06-28 02:50:50 +12:00
budibase/packages/server/src/api/controllers/backup.js
Keviin Åberg Kultalahti 4ec2e7d01f lint:fix
2021-05-03 09:31:09 +02:00

11 lines
358 B
JavaScript

const { performBackup } = require("../../utilities/fileSystem")
exports.exportAppDump = async function (ctx) {
const { appId } = ctx.query
const appname = decodeURI(ctx.query.appname)
const backupIdentifier = `${appname}Backup${new Date().getTime()}.txt`
ctx.attachment(backupIdentifier)
ctx.body = await performBackup(appId, backupIdentifier)
}