File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export = class DatabaseInitializer {
99 private client : any ;
1010
1111 constructor ( client : any ) {
12- if ( ! client ) return new Error ( `client is required` ) ;
12+ if ( ! client ) throw new Error ( `client is required` ) ;
1313 this . client = client ;
1414 }
1515
@@ -397,7 +397,7 @@ export = class DatabaseInitializer {
397397 ] ;
398398
399399 for ( const schema of schemas ) {
400- const id = schema . _id . $oid ;
400+ const id = schema . _id ;
401401 let schemaDb = await userData . findOne ( { _id : id } ) . catch ( ( ) => { } ) ;
402402 if ( schemaDb ) continue ;
403403 schemaDb = await new userData ( this . convertIdsRecursive ( schema ) ) . save ( ) ;
Original file line number Diff line number Diff line change 1+ import { Server } from "socket.io" ;
2+ import { EventEmitter } from "events" ;
3+
4+ export interface Client {
5+ server : any ;
6+ config : any ;
7+ links : string [ ] ;
8+ parseURL : ( link : string ) => any ;
9+ ipport : ( link : string , port : number ) => string ;
10+ port : number ;
11+ logger : any ;
12+ wspaths : Map < string , any > ;
13+ io : Server ;
14+ wsevents : EventEmitter ;
15+ }
You can’t perform that action at this time.
0 commit comments