@@ -134,7 +134,7 @@ const init = (AV) => {
134134 masterKeyWarn ( ) ;
135135 }
136136 initialize ( options . appId , options . appKey , options . masterKey ) ;
137- request . setRegionServer ( AV , options . region ) ;
137+ request . setServerUrlByRegion ( AV , options . region ) ;
138138 AVConfig . disableCurrentUser = options . disableCurrentUser ;
139139 } else {
140140 throw new Error ( 'AV.init(): Parameter is not correct.' ) ;
@@ -148,7 +148,7 @@ const init = (AV) => {
148148 masterKeyWarn ( ) ;
149149 }
150150 initialize ( ...args ) ;
151- request . setRegionServer ( AV , 'cn' ) ;
151+ request . setServerUrlByRegion ( AV , 'cn' ) ;
152152 break ;
153153 }
154154 } ;
@@ -191,7 +191,7 @@ const init = (AV) => {
191191 **/
192192 // TODO: 后续不再暴露此接口
193193 AV . useAVCloudCN = function ( ) {
194- request . setRegionServer ( AV , 'cn' ) ;
194+ request . setServerUrlByRegion ( AV , 'cn' ) ;
195195 console . warn ( 'Do not use AV.useAVCloudCN. Please use AV.init(), you can set the region of server.' ) ;
196196 } ;
197197
@@ -200,7 +200,7 @@ const init = (AV) => {
200200 **/
201201 // TODO: 后续不再暴露此接口
202202 AV . useAVCloudUS = function ( ) {
203- request . setRegionServer ( AV , 'us' ) ;
203+ request . setServerUrlByRegion ( AV , 'us' ) ;
204204 console . warn ( 'Do not use AV.useAVCloudUS. Please use AV.init(), you can set the region of server.' ) ;
205205 } ;
206206
0 commit comments