toLowerCase in one place

This commit is contained in:
Girish Ramakrishnan
2016-06-03 23:54:46 -07:00
parent e2848d3e08
commit bfe8df35df

View File

@@ -355,7 +355,7 @@ function install(appId, data, auditSource, callback) {
var appStoreId = data.appStoreId,
manifest = data.manifest,
location = data.location,
location = data.location.toLowerCase(),
portBindings = data.portBindings || null,
accessRestriction = data.accessRestriction || null,
icon = data.icon || null,
@@ -418,8 +418,8 @@ function install(appId, data, auditSource, callback) {
purchase(appStoreId, function (error) {
if (error) return callback(error);
appdb.add(appId, appStoreId, manifest, location.toLowerCase(), portBindings, accessRestriction, memoryLimit, altDomain, function (error) {
if (error && error.reason === DatabaseError.ALREADY_EXISTS) return callback(getDuplicateErrorDetails(location.toLowerCase(), portBindings, error));
appdb.add(appId, appStoreId, manifest, location, portBindings, accessRestriction, memoryLimit, altDomain, 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));
// save cert to data/box/certs