make appdb.add take a data object

This commit is contained in:
Girish Ramakrishnan
2016-06-17 16:43:35 -05:00
parent 224a5f370f
commit fe62aba4d7
12 changed files with 34 additions and 25 deletions
+7 -1
View File
@@ -446,7 +446,13 @@ function install(data, auditSource, callback) {
purchase(appStoreId, function (error) {
if (error) return callback(error);
appdb.add(appId, appStoreId, manifest, location, portBindings, accessRestriction, memoryLimit, altDomain, function (error) {
var data = {
accessRestriction: accessRestriction,
memoryLimit: memoryLimit,
altDomain: altDomain
};
appdb.add(appId, appStoreId, manifest, location, portBindings, data, function (error) {
if (error && error.reason === DatabaseError.ALREADY_EXISTS) return callback(getDuplicateErrorDetails(location, portBindings, error));
if (error) return callback(new AppsError(AppsError.INTERNAL_ERROR, error));