File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,13 @@ class CoCreateFileSystem {
42
42
}
43
43
}
44
44
45
+ let organization_id
45
46
if ( ! organization || organization . error ) {
46
47
let hostNotFound = await getDefaultFile ( '/hostNotFound.html' )
47
48
return sendResponse ( hostNotFound . object [ 0 ] . src , 404 , { 'Content-Type' : 'text/html' } )
48
49
}
49
50
50
- const organization_id = organization . _id
51
+ organization_id = organization . _id
51
52
data . organization_id = organization_id
52
53
53
54
res . setHeader ( 'organization' , organization_id )
@@ -176,11 +177,12 @@ class CoCreateFileSystem {
176
177
src = JSON . stringify ( src ) ;
177
178
}
178
179
179
- crud . wsManager . emit ( "setBandwidth" , {
180
- type : 'out' ,
181
- data : src ,
182
- organization_id
183
- } ) ;
180
+ if ( organization_id )
181
+ crud . wsManager . emit ( "setBandwidth" , {
182
+ type : 'out' ,
183
+ data : src ,
184
+ organization_id
185
+ } ) ;
184
186
res . writeHead ( statusCode , headers ) ;
185
187
return res . end ( src ) ;
186
188
} catch ( error ) {
You can’t perform that action at this time.
0 commit comments