File tree 1 file changed +5
-20
lines changed
1 file changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -81,14 +81,14 @@ class ParseServer {
81
81
logging . setLogger ( loggerController ) ;
82
82
83
83
// Note: Tests will start to fail if any validation happens after this is called.
84
- databaseController
85
- . performInitialization ( )
84
+ Promise . resolve ( )
85
+ . then ( async ( ) => await databaseController . performInitialization ( ) )
86
86
. then ( async ( ) => await hooksController . load ( ) )
87
- . then ( ( ) => {
87
+ . then ( async ( ) => {
88
88
if ( cloud ) {
89
- addParseCloud ( ) ;
89
+ await addParseCloud ( ) ;
90
90
if ( typeof cloud === 'function' ) {
91
- cloud ( Parse ) ;
91
+ await cloud ( Parse ) ;
92
92
} else if ( typeof cloud === 'string' ) {
93
93
require ( path . resolve ( process . cwd ( ) , cloud ) ) ;
94
94
} else {
@@ -110,21 +110,6 @@ class ParseServer {
110
110
}
111
111
} ) ;
112
112
113
- if ( cloud ) {
114
- addParseCloud ( ) ;
115
- if ( typeof cloud === 'function' ) {
116
- cloud ( Parse ) ;
117
- } else if ( typeof cloud === 'string' ) {
118
- if ( process . env . npm_package_type === 'module' ) {
119
- import ( path . resolve ( process . cwd ( ) , cloud ) ) ;
120
- } else {
121
- require ( path . resolve ( process . cwd ( ) , cloud ) ) ;
122
- }
123
- } else {
124
- throw "argument 'cloud' must either be a string or a function" ;
125
- }
126
- }
127
-
128
113
if ( security && security . enableCheck && security . enableCheckLog ) {
129
114
new CheckRunner ( options . security ) . run ( ) ;
130
115
}
You can’t perform that action at this time.
0 commit comments