move appstore urls into appstore.js

This commit is contained in:
Girish Ramakrishnan
2023-08-04 15:34:38 +05:30
parent 37ae142a16
commit fb9d8c23e1
10 changed files with 128 additions and 128 deletions

View File

@@ -67,6 +67,7 @@ exports = module.exports = {
};
const apps = require('../apps.js'),
appstore = require('../appstore.js'),
assert = require('assert'),
AuditSource = require('../auditsource.js'),
BoxError = require('../boxerror.js'),
@@ -180,7 +181,7 @@ async function install(req, res, next) {
if ('enableTurn' in data && typeof data.enableTurn !== 'boolean') return next(new HttpError(400, 'enableTurn must be boolean'));
let [error, result] = await safe(apps.downloadManifest(data.appStoreId, data.manifest));
let [error, result] = await safe(appstore.downloadManifest(data.appStoreId, data.manifest));
if (error) return next(BoxError.toHttpError(error));
if (result.appStoreId === constants.PROXY_APP_APPSTORE_ID && typeof data.upstreamUri !== 'string') return next(new HttpError(400, 'upstreamUri must be a non empty string'));