Skip to content

Commit 9092303

Browse files
committed
bug fixes
1 parent 900773e commit 9092303

4 files changed

Lines changed: 8 additions & 12 deletions

File tree

OpenFlowNodeRED/src/nodered/nodes/googleauth.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,6 @@
187187
https://www.googleapis.com/auth/youtube.force-ssl
188188
</p>
189189
<br>
190-
<p>
191-
msg.Client will contain a request object you can use in other flows to do more quests
192-
</p>
193190
<br>
194191
<p>
195192
Select the authentication method that fits the api.

OpenFlowNodeRED/src/nodered/nodes/googleauth_nodes.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,20 +236,14 @@ export class googleauth_request {
236236
this.node.status({ fill: "blue", shape: "dot", text: "Requesting" });
237237
var res: any;
238238
if (this.Client != null) {
239-
msg.Client = this.Client.request;
240239
res = await this.Client.request(options);
241-
msg.config = res.config;
242240
msg.status = res.status;
243241
msg.statusText = res.statusText;
244-
msg.request = res.request;
245242
msg.payload = res.data;
246243
this.node.status({});
247244
send(msg);
248245
done();
249246
} else {
250-
msg.Client = request;
251-
// options.body = JSON.stringify(options.data);
252-
253247
options.body = options.data;
254248
options.json = true;
255249
delete options.data;
@@ -260,6 +254,7 @@ export class googleauth_request {
260254
}
261255
msg.payload = body;
262256
msg.status = response.statusCode;
257+
msg.statusText = response.statusText;
263258
this.node.status({});
264259
send(msg);
265260
done();

OpenFlowNodeRED/src/nodered/nodes/workflow_nodes.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ export class workflow_in_node {
150150
if (data.payload._id !== null && data.payload._id !== undefined && data.payload._id !== "") _id = data.payload._id;
151151
}
152152
}
153-
this.node.status({ fill: "blue", shape: "dot", text: "Processing " + _id });
153+
154154
console.log(data);
155155
if (_id !== null && _id !== undefined && _id !== "") {
156-
156+
this.node.status({ fill: "blue", shape: "dot", text: "Processing id " + _id });
157157
var jwt = data.jwt;
158158
delete data.jwt;
159159

@@ -195,6 +195,7 @@ export class workflow_in_node {
195195
// }
196196
// result.workflow = this.workflow._id;
197197
} else {
198+
this.node.status({ fill: "blue", shape: "dot", text: "Processing new instance " });
198199
var queue: string = this.config.queue;
199200
if (!NoderedUtil.IsNullUndefinded(Config.queue_prefix)) {
200201
queue = Config.queue_prefix + this.config.queue;
@@ -204,6 +205,7 @@ export class workflow_in_node {
204205

205206
var who = WebSocketClient.instance.user;
206207
var me = WebSocketClient.instance.user;
208+
this.node.status({ fill: "blue", shape: "dot", text: "Renew token " });
207209
if (!NoderedUtil.IsNullEmpty(jwt)) {
208210
var signin = await NoderedUtil.RenewToken(jwt, true);
209211
who = signin.user;
@@ -214,11 +216,13 @@ export class workflow_in_node {
214216
item = Base.assign(item);
215217
item.addRight(who._id, who.name, [-1]);
216218
if (who._id != me._id) item.addRight(me._id, me.name, [-1]);
219+
this.node.status({ fill: "blue", shape: "dot", text: "Create instance " });
217220
var res2 = await NoderedUtil.InsertOne("workflow_instances", item, 1, true, jwt);
218221

219222
// Logger.instanse.info("workflow in activated creating a new workflow instance with id " + res2._id);
220223
// OpenFlow Controller.ts needs the id, when creating a new intance !
221224
data._id = res2._id;
225+
this.node.status({ fill: "blue", shape: "dot", text: "Processing new id " + res2._id });
222226
if (data.payload !== null && data.payload != undefined) {
223227
try {
224228
data.payload._id = res2._id;

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.548
1+
0.0.549

0 commit comments

Comments
 (0)