update: if no backup site, show error message
This commit is contained in:
@@ -2327,6 +2327,11 @@ async function updateApp(app, data, auditSource) {
|
||||
error = await checkManifest(manifest);
|
||||
if (error) throw error;
|
||||
|
||||
if (!skipBackup) {
|
||||
const sites = await backupSites.listByContentForUpdates(app.id);
|
||||
if (sites.length === 0) throw new BoxError(BoxError.BAD_STATE, 'App has no backup site for updates');
|
||||
}
|
||||
|
||||
const updateConfig = { skipBackup, manifest }; // this will clear appStoreId/versionsUrl when updating from a repo and set it if passed in for update route
|
||||
if ('appStoreId' in data) updateConfig.appStoreId = data.appStoreId;
|
||||
if ('versionsUrl' in data) updateConfig.versionsUrl = data.versionsUrl;
|
||||
|
||||
Reference in New Issue
Block a user