in source/tenant-registration/server.js [174:212]
function saveTenantData(tenant) {
var promise = new Promise(function(resolve, reject) {
// init the tenant sace request
var tenantRequestData = {
"tenant_id": tenant.tenant_id,
"companyName": tenant.companyName,
"accountName": tenant.accountName,
"ownerName": tenant.ownerName,
"tier": tenant.tier,
"email": tenant.email,
"status": "Active",
"UserPoolId": tenant.UserPoolId,
"IdentityPoolId": tenant.IdentityPoolId,
"systemAdminRole": tenant.systemAdminRole,
"systemSupportRole": tenant.systemSupportRole,
"trustRole": tenant.trustRole,
"systemAdminPolicy": tenant.systemAdminPolicy,
"systemSupportPolicy": tenant.systemSupportPolicy,
"userName": tenant.userName,
};
// fire request
request({
url: tenantURL,
method: "POST",
json: true,
headers: {"content-type": "application/json"},
body: tenantRequestData
}, function (error, response, body) {
if (error || (response.statusCode != 200)) {
reject(error);
} else {
resolve(body);
}
});
});
return promise;
}