Update wizard.js

This commit is contained in:
kasenvr 2020-10-13 18:57:30 -04:00 committed by GitHub
parent 9624d3bb0c
commit 065971381d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,31 +173,31 @@ function setupWizardSteps() {
} }
function promptToCreateDomainID() { function promptToCreateDomainID() {
setTimeout(function(){ setTimeout(function() {
createDomainIDPrompt(function(label) { createDomainIDPrompt(function(label) {
var domainJSON = { var domainJSON = {
"label": label "label": label
} }
$.post("/api/domains", domainJSON, function(data) { $.post("/api/domains", domainJSON, function(data) {
// we successfully created a domain ID, set it on that field // we successfully created a domain ID, set it on that field
var domainID = data.domain.domainId; var domainID = data.domain.domainId;
console.log("Setting domain ID to ", data, domainID); console.log("Setting domain ID to ", data, domainID);
var formJSON = { var formJSON = {
"metaverse": { "metaverse": {
"id": domainID "id": domainID
} }
} }
// POST the form JSON to the domain-server settings.json endpoint so the settings are saved // POST the form JSON to the domain-server settings.json endpoint so the settings are saved
postSettings(formJSON, goToNextStep); postSettings(formJSON, goToNextStep);
}, 'json').fail(function(){ }, 'json').fail(function() {
console.log("Failed to create domain ID..."); console.log("Failed to create domain ID...");
goToNextStep(); goToNextStep();
}); });
}); });
}, 500); // Apparently swal needs time before opening another prompt. }, 500); // Apparently swal needs time before opening another prompt.
} }
function updatePlaceNameLink(address) { function updatePlaceNameLink(address) {