mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Ensure application/json on library flows reqs
This commit is contained in:
@@ -236,7 +236,12 @@ RED.editor = (function() {
|
||||
//TODO: move this to RED.library
|
||||
var flowName = $("#node-input-filename").val();
|
||||
if (!/^\s*$/.test(flowName)) {
|
||||
$.post('library/flows/'+flowName,$("#node-input-filename").attr('nodes'),function() {
|
||||
$.ajax({
|
||||
url:'library/flows/'+flowName,
|
||||
type: "POST",
|
||||
data: $("#node-input-filename").attr('nodes'),
|
||||
contentType: "application/json; charset=utf-8"
|
||||
}).done(function() {
|
||||
RED.library.loadFlowLibrary();
|
||||
RED.notify("Saved nodes","success");
|
||||
});
|
||||
|
Reference in New Issue
Block a user