Remove app purchase/unpurchase

This commit is contained in:
Johannes Zellner
2025-05-13 11:46:13 +02:00
parent f77aeded6f
commit b8dcfcf900
4 changed files with 1 additions and 165 deletions

View File

@@ -1474,8 +1474,6 @@ async function install(data, auditSource) {
if (addError && addError.reason === BoxError.ALREADY_EXISTS) throw getDuplicateErrorDetails(addError.message, locations, portBindings);
if (addError) throw addError;
await purchaseApp({ appId, appstoreId: appStoreId, manifestId: manifest.id || 'customapp' });
const task = {
args: { restoreConfig: null, skipDnsSetup, overwriteDns },
values: { },
@@ -2376,17 +2374,6 @@ async function exportApp(app, data, auditSource) {
return { taskId };
}
async function purchaseApp(data) {
assert.strictEqual(typeof data, 'object');
const [purchaseError] = await safe(appstore.purchaseApp(data));
if (!purchaseError) return;
await del(data.appId);
throw purchaseError;
}
async function clone(app, data, user, auditSource) {
assert.strictEqual(typeof app, 'object');
assert.strictEqual(typeof data, 'object');
@@ -2458,8 +2445,6 @@ async function clone(app, data, user, auditSource) {
if (addError && addError.reason === BoxError.ALREADY_EXISTS) throw getDuplicateErrorDetails(addError.message, locations, portBindings);
if (addError) throw addError;
await purchaseApp({ appId: newAppId, appstoreId: app.appStoreId, manifestId: manifest.id || 'customapp' });
const restoreConfig = { remotePath: backupInfo.remotePath, backupFormat: backupInfo.format };
const task = {
args: { restoreConfig, overwriteDns, skipDnsSetup, oldManifest: null },
@@ -2535,8 +2520,6 @@ async function unarchive(archive, data, auditSource) {
if (addError && addError.reason === BoxError.ALREADY_EXISTS) throw getDuplicateErrorDetails(addError.message, locations, portBindings);
if (addError) throw addError;
await purchaseApp({ appId, appstoreId: appStoreId, manifestId: manifest.id || 'customapp' });
const task = {
args: { restoreConfig, overwriteDns },
values: {},
@@ -2564,8 +2547,6 @@ async function uninstall(app, auditSource) {
const error = checkAppState(app, exports.ISTATE_PENDING_UNINSTALL);
if (error) throw error;
await appstore.unpurchaseApp(appId, { appstoreId: app.appStoreId, manifestId: app.manifest.id || 'customapp' });
const task = {
args: {},
values: {},