@@ -36,18 +36,18 @@ var api = ( ()=> {
3636 collection : "organizations" ,
3737 apiKey : config [ "apiKey" ] ,
3838 organization_id : config [ "organization_id" ] ,
39- data : {
39+ document : {
4040 _id : config [ "organization_id" ]
4141 }
4242
4343 } ) ;
4444
45- if ( ! org || ! org . data && ! org . data [ 0 ] ) {
45+ if ( ! org || ! org . document && ! org . document [ 0 ] ) {
4646 console . log ( component , " Error GET ORG in : " , e ) ;
4747 return false ;
4848 }
4949
50- return org . data [ 0 ] ;
50+ return org . document [ 0 ] ;
5151 } ,
5252
5353 getOrgInRoutesbyHostname : async ( config , hostname ) => {
@@ -78,11 +78,8 @@ var api = ( ()=> {
7878 apiKey : config [ "config" ] [ "apiKey" ] ,
7979 organization_id : config [ "config" ] [ "organization_id" ]
8080 } ) ;
81-
82- //let data2 = await crud.listenAsync(eventGetOrg);
83- // console.log("data2 ===", data2)
8481
85- var org = data2 [ "data" ] [ 0 ]
82+ var org = data2 . document [ 0 ]
8683
8784 var socket_config = {
8885 "config" : {
@@ -104,7 +101,7 @@ var api = ( ()=> {
104101 collection : "organizations" ,
105102 apiKey : org [ "apiKey" ] ,
106103 organization_id : org [ "_id" ] ,
107- data : {
104+ document : {
108105 _id : org [ "_id" ]
109106 }
110107 } ) ;
0 commit comments