mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add warning if HTTP In node is missing path config
This commit is contained in:
parent
d96b6e77c0
commit
66ec9bae27
@ -48,6 +48,10 @@ module.exports = function(RED) {
|
|||||||
RED.nodes.createNode(this,n);
|
RED.nodes.createNode(this,n);
|
||||||
if (RED.settings.httpNodeRoot !== false) {
|
if (RED.settings.httpNodeRoot !== false) {
|
||||||
|
|
||||||
|
if (!n.url) {
|
||||||
|
this.warn(RED._("httpin.errors.missing-path"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.url = n.url;
|
this.url = n.url;
|
||||||
this.method = n.method;
|
this.method = n.method;
|
||||||
this.swaggerDoc = n.swaggerDoc;
|
this.swaggerDoc = n.swaggerDoc;
|
||||||
|
@ -269,6 +269,7 @@
|
|||||||
"httpreq": "http request",
|
"httpreq": "http request",
|
||||||
"errors": {
|
"errors": {
|
||||||
"not-created": "Cannot create http-in node when httpNodeRoot set to false",
|
"not-created": "Cannot create http-in node when httpNodeRoot set to false",
|
||||||
|
"missing-path": "missing path",
|
||||||
"no-response": "No response object",
|
"no-response": "No response object",
|
||||||
"json-error": "JSON parse error",
|
"json-error": "JSON parse error",
|
||||||
"no-url": "No url specified"
|
"no-url": "No url specified"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user