2021-10-19 00:08:12 +13:00
|
|
|
const { streamBackup } = require("../../utilities/fileSystem")
|
2021-01-28 02:55:46 +13:00
|
|
|
|
2021-05-03 19:31:09 +12:00
|
|
|
exports.exportAppDump = async function (ctx) {
|
2021-02-05 23:55:54 +13:00
|
|
|
const { appId } = ctx.query
|
2021-10-19 00:08:12 +13:00
|
|
|
const appName = decodeURI(ctx.query.appname)
|
|
|
|
const backupIdentifier = `${appName}-export-${new Date().getTime()}.txt`
|
2021-01-30 10:52:45 +13:00
|
|
|
ctx.attachment(backupIdentifier)
|
2021-10-19 00:08:12 +13:00
|
|
|
ctx.body = await streamBackup(appId)
|
2021-01-28 02:55:46 +13:00
|
|
|
}
|