1
0
Fork 0
mirror of synced 2024-06-23 08:30:31 +12:00

Adding a check to see if app backups feature is enabled.

This commit is contained in:
mike12345567 2022-10-24 13:33:36 +01:00
parent e31ce3f8a9
commit 12d0187211

View file

@ -110,14 +110,17 @@ async function deployApp(deployment: any, userId: string) {
// can't do this in test
if (!env.isTest()) {
// trigger backup initially
await backups.triggerAppBackup(
productionAppId,
AppBackupTrigger.PUBLISH,
{
createdBy: userId,
}
)
// don't try this if feature isn't allowed, will error
if (!(await backups.isEnabled())) {
// trigger backup initially
await backups.triggerAppBackup(
productionAppId,
AppBackupTrigger.PUBLISH,
{
createdBy: userId,
}
)
}
}
const config: any = {