@@ -128,6 +128,9 @@ export class api_get {
128128 if ( ! NoderedUtil . IsNullUndefinded ( msg . orderby ) ) { this . config . orderby = msg . orderby ; }
129129 if ( ! NoderedUtil . IsNullEmpty ( msg . top ) ) { this . config . top = parseInt ( msg . top ) ; }
130130 if ( ! NoderedUtil . IsNullEmpty ( msg . skip ) ) { this . config . skip = parseInt ( msg . skip ) ; }
131+ if ( NoderedUtil . IsNullEmpty ( msg . jwt ) && ! NoderedUtil . IsNullEmpty ( Config . jwt ) ) {
132+ msg . jwt = Config . jwt ;
133+ }
131134
132135 if ( NoderedUtil . IsNullEmpty ( this . config . top ) ) { this . config . top = 500 ; }
133136 if ( NoderedUtil . IsNullEmpty ( this . config . skip ) ) { this . config . skip = 0 ; }
@@ -210,6 +213,10 @@ export class api_add {
210213 if ( ! NoderedUtil . IsNullEmpty ( msg . resultfield ) ) { this . config . resultfield = msg . resultfield ; }
211214 if ( ! NoderedUtil . IsNullEmpty ( msg . writeconcern ) ) { this . config . writeconcern = msg . writeconcern ; }
212215 if ( ! NoderedUtil . IsNullEmpty ( msg . journal ) ) { this . config . journal = msg . journal ; }
216+ if ( NoderedUtil . IsNullEmpty ( msg . jwt ) && ! NoderedUtil . IsNullEmpty ( Config . jwt ) ) {
217+ msg . jwt = Config . jwt ;
218+ }
219+
213220
214221 if ( ( this . config . writeconcern as any ) === undefined || ( this . config . writeconcern as any ) === null ) this . config . writeconcern = 0 ;
215222 if ( ( this . config . journal as any ) === undefined || ( this . config . journal as any ) === null ) this . config . journal = false ;
@@ -282,6 +289,9 @@ export class api_update {
282289 if ( ! NoderedUtil . IsNullEmpty ( msg . resultfield ) ) { this . config . resultfield = msg . resultfield ; }
283290 if ( ! NoderedUtil . IsNullEmpty ( msg . writeconcern ) ) { this . config . writeconcern = msg . writeconcern ; }
284291 if ( ! NoderedUtil . IsNullEmpty ( msg . journal ) ) { this . config . journal = msg . journal ; }
292+ if ( NoderedUtil . IsNullEmpty ( msg . jwt ) && ! NoderedUtil . IsNullEmpty ( Config . jwt ) ) {
293+ msg . jwt = Config . jwt ;
294+ }
285295
286296 if ( ( this . config . writeconcern as any ) === undefined || ( this . config . writeconcern as any ) === null ) this . config . writeconcern = 0 ;
287297 if ( ( this . config . journal as any ) === undefined || ( this . config . journal as any ) === null ) this . config . journal = false ;
@@ -355,6 +365,9 @@ export class api_addorupdate {
355365 if ( ! NoderedUtil . IsNullEmpty ( msg . uniqeness ) ) { this . config . uniqeness = msg . uniqeness ; }
356366 if ( ! NoderedUtil . IsNullEmpty ( msg . writeconcern ) ) { this . config . writeconcern = msg . writeconcern ; }
357367 if ( ! NoderedUtil . IsNullEmpty ( msg . journal ) ) { this . config . journal = msg . journal ; }
368+ if ( NoderedUtil . IsNullEmpty ( msg . jwt ) && ! NoderedUtil . IsNullEmpty ( Config . jwt ) ) {
369+ msg . jwt = Config . jwt ;
370+ }
358371
359372 if ( ( this . config . writeconcern as any ) === undefined || ( this . config . writeconcern as any ) === null ) this . config . writeconcern = 0 ;
360373 if ( ( this . config . journal as any ) === undefined || ( this . config . journal as any ) === null ) this . config . journal = false ;
@@ -421,6 +434,9 @@ export class api_delete {
421434
422435 if ( ! NoderedUtil . IsNullEmpty ( msg . collection ) ) { this . config . collection = msg . collection ; }
423436 if ( ! NoderedUtil . IsNullEmpty ( msg . inputfield ) ) { this . config . inputfield = msg . inputfield ; }
437+ if ( NoderedUtil . IsNullEmpty ( msg . jwt ) && ! NoderedUtil . IsNullEmpty ( Config . jwt ) ) {
438+ msg . jwt = Config . jwt ;
439+ }
424440
425441 var data : any [ ] = [ ] ;
426442 var _data = NoderedUtil . FetchFromObject ( msg , this . config . inputfield ) ;
@@ -490,6 +506,9 @@ export class api_map_reduce {
490506 if ( ! NoderedUtil . IsNullUndefinded ( msg . finalize ) ) { this . config . finalize = msg . finalize ; }
491507 if ( ! NoderedUtil . IsNullUndefinded ( msg . scope ) ) { this . config . finalize = msg . scope ; }
492508 if ( ! NoderedUtil . IsNullUndefinded ( msg . query ) ) { this . config . query = msg . query ; }
509+ if ( NoderedUtil . IsNullEmpty ( msg . jwt ) && ! NoderedUtil . IsNullEmpty ( Config . jwt ) ) {
510+ msg . jwt = Config . jwt ;
511+ }
493512
494513 var scope = NoderedUtil . FetchFromObject ( msg , this . config . scope ) ;
495514 var _output : any = { } ;
@@ -560,6 +579,9 @@ export class api_updatedocument {
560579 if ( ! NoderedUtil . IsNullEmpty ( msg . collection ) ) { this . config . collection = msg . collection ; }
561580 if ( ! NoderedUtil . IsNullEmpty ( msg . writeconcern ) ) { this . config . writeconcern = msg . writeconcern ; }
562581 if ( ! NoderedUtil . IsNullEmpty ( msg . journal ) ) { this . config . journal = msg . journal ; }
582+ if ( NoderedUtil . IsNullEmpty ( msg . jwt ) && ! NoderedUtil . IsNullEmpty ( Config . jwt ) ) {
583+ msg . jwt = Config . jwt ;
584+ }
563585
564586 if ( ( this . config . writeconcern as any ) === undefined || ( this . config . writeconcern as any ) === null ) this . config . writeconcern = 0 ;
565587 if ( ( this . config . journal as any ) === undefined || ( this . config . journal as any ) === null ) this . config . journal = false ;
@@ -743,6 +765,9 @@ export class download_file {
743765 // if (NoderedUtil.IsNullEmpty(msg.jwt)) { return NoderedUtil.HandleError(this, "Missing jwt token"); }
744766 if ( ! NoderedUtil . IsNullEmpty ( msg . fileid ) ) { this . config . fileid = msg . fileid ; }
745767 if ( ! NoderedUtil . IsNullEmpty ( msg . filename ) ) { this . config . filename = msg . filename ; }
768+ if ( NoderedUtil . IsNullEmpty ( msg . jwt ) && ! NoderedUtil . IsNullEmpty ( Config . jwt ) ) {
769+ msg . jwt = Config . jwt ;
770+ }
746771
747772 this . node . status ( { fill : "blue" , shape : "dot" , text : "Getting file" } ) ;
748773 var file = await NoderedUtil . GetFile ( this . config . filename , this . config . fileid , msg . jwt ) ;
@@ -784,6 +809,9 @@ export class upload_file {
784809 // if (NoderedUtil.IsNullEmpty(msg.jwt)) { return NoderedUtil.HandleError(this, "Missing jwt token"); }
785810 if ( ! NoderedUtil . IsNullEmpty ( msg . filename ) ) { this . config . filename = msg . filename ; }
786811 if ( ! NoderedUtil . IsNullEmpty ( msg . mimeType ) ) { this . config . mimeType = msg . mimeType ; }
812+ if ( NoderedUtil . IsNullEmpty ( msg . jwt ) && ! NoderedUtil . IsNullEmpty ( Config . jwt ) ) {
813+ msg . jwt = Config . jwt ;
814+ }
787815
788816 this . node . status ( { fill : "blue" , shape : "dot" , text : "Saving file" } ) ;
789817 var file = await NoderedUtil . SaveFile ( this . config . filename , this . config . mimeType , msg . metadata , msg . payload , msg . jwt ) ;
0 commit comments