mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add custom project.toJSON to simplify state mangement
This commit is contained in:
@@ -188,18 +188,15 @@ RED.projects = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
RED.deploy.setDeployInflight(true);
|
||||
RED.projects.settings.switchProject(projectData.name);
|
||||
|
||||
sendRequest({
|
||||
url: "projects",
|
||||
type: "POST",
|
||||
responses: {
|
||||
200: function(data) {
|
||||
switchProject(projectData.name,function(err,data) {
|
||||
if (err) {
|
||||
console.log("unexpected_error",error)
|
||||
} else {
|
||||
dialog.dialog( "close" );
|
||||
}
|
||||
})
|
||||
dialog.dialog( "close" );
|
||||
},
|
||||
400: {
|
||||
'project_exists': function(error) {
|
||||
@@ -217,7 +214,9 @@ RED.projects = (function() {
|
||||
}
|
||||
}
|
||||
}
|
||||
},projectData)
|
||||
},projectData).always(function() {
|
||||
RED.deploy.setDeployInflight(false);
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user