@@ -101,21 +101,15 @@ class StudiosServerAPI implements StudiosRestAPI {
101101
102102 await Studios . upsertAsync ( studioId , newStudio )
103103
104- // wait for the upsert to complete before validation and upgrade read from the studios collection
105- await new Promise < void > ( ( resolve ) => setTimeout ( ( ) => resolve ( ) , 200 ) )
106-
107104 const validation = await validateConfigForStudio ( studioId )
108105 checkValidation ( `addOrUpdateStudio ${ studioId } ` , validation . messages )
109106
110- return ClientAPI . responseSuccess (
111- await new Promise < string | false > ( ( resolve ) =>
112- // wait for the upsert to complete before upgrade
113- setTimeout ( async ( ) => {
114- await runUpgradeForStudio ( studioId )
115- resolve ( await updateStudioBaseline ( studioId ) )
116- } , 200 )
117- )
118- )
107+ // wait for the upsert to complete before upgrade
108+ await new Promise < void > ( ( resolve ) => setTimeout ( ( ) => resolve ( ) , 200 ) )
109+
110+ await runUpgradeForStudio ( studioId )
111+
112+ return ClientAPI . responseSuccess ( await updateStudioBaseline ( studioId ) )
119113 }
120114
121115 async getStudioConfig (
@@ -151,21 +145,15 @@ class StudiosServerAPI implements StudiosRestAPI {
151145
152146 await Studios . upsertAsync ( studioId , newStudio )
153147
154- // wait for the upsert to complete before validation and upgrade read from the studios collection
155- await new Promise < void > ( ( resolve ) => setTimeout ( ( ) => resolve ( ) , 200 ) )
156-
157148 const validation = await validateConfigForStudio ( studioId )
158149 checkValidation ( `updateStudioConfig ${ studioId } ` , validation . messages )
159150
160- return ClientAPI . responseSuccess (
161- await new Promise < string | false > ( ( resolve ) =>
162- // wait for the upsert to complete before upgrade
163- setTimeout ( async ( ) => {
164- await runUpgradeForStudio ( studioId )
165- resolve ( await updateStudioBaseline ( studioId ) )
166- } , 200 )
167- )
168- )
151+ // wait for the upsert to complete before upgrade
152+ await new Promise < void > ( ( resolve ) => setTimeout ( ( ) => resolve ( ) , 200 ) )
153+
154+ await runUpgradeForStudio ( studioId )
155+
156+ return ClientAPI . responseSuccess ( await updateStudioBaseline ( studioId ) )
169157 }
170158
171159 async deleteStudio (
0 commit comments