Adding a check to see if app backups feature is enabled.
This commit is contained in:
parent
5340b49d6b
commit
bc2d499625
1 changed files with 11 additions and 8 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue