2021-03-19 20:07:47 +01:00
|
|
|
const { performBackup } = require("../../utilities/fileSystem")
|
2021-01-27 14:55:46 +01:00
|
|
|
|
2021-05-03 09:31:09 +02:00
|
|
|
exports.exportAppDump = async function (ctx) {
|
2021-02-05 11:55:54 +01:00
|
|
|
const { appId } = ctx.query
|
|
|
|
const appname = decodeURI(ctx.query.appname)
|
2021-02-03 14:28:11 +01:00
|
|
|
const backupIdentifier = `${appname}Backup${new Date().getTime()}.txt`
|
2021-01-27 14:55:46 +01:00
|
|
|
|
2021-01-29 22:52:45 +01:00
|
|
|
ctx.attachment(backupIdentifier)
|
2021-03-19 20:07:47 +01:00
|
|
|
ctx.body = await performBackup(appId, backupIdentifier)
|
2021-01-27 14:55:46 +01:00
|
|
|
}
|