@@ -49,7 +49,7 @@ let _disableAppRouter = false;
4949 * @param {String } options.appKey application key
5050 * @param {String } [options.masterKey] application master key
5151 * @param {Boolean } [options.production]
52- * @param {String|ServerURLs } [options.serverURLs ] URLs for services. if a string was given, it will be applied for all services.
52+ * @param {String|ServerURLs } [options.serverURL ] URLs for services. if a string was given, it will be applied for all services.
5353 * @param {Boolean } [options.disableCurrentUser]
5454 */
5555AV . init = function init ( options , ...params ) {
@@ -65,7 +65,8 @@ AV.init = function init(options, ...params) {
6565 appKey,
6666 masterKey,
6767 hookKey,
68- serverURLs,
68+ serverURL,
69+ serverURLs = serverURL ,
6970 disableCurrentUser,
7071 production,
7172 realtime,
@@ -78,7 +79,7 @@ AV.init = function init(options, ...params) {
7879 if ( isCNApp ( appId ) ) {
7980 if ( ! serverURLs && isEmpty ( AV . _config . serverURLs ) ) {
8081 throw new TypeError (
81- `serverURLs option is required for apps from CN region`
82+ `serverURL option is required for apps from CN region`
8283 ) ;
8384 }
8485 }
@@ -163,12 +164,13 @@ AV._setServerURLs = (urls, disableAppRouter = true) => {
163164} ;
164165/**
165166 * Set server URLs for services.
166- * @function AV.setServerURLs
167- * @since 3.0 .0
167+ * @function AV.setServerURL
168+ * @since 4.3 .0
168169 * @param {String|ServerURLs } urls URLs for services. if a string was given, it will be applied for all services.
169- * You can also set them when initializing SDK with `options.serverURLs `
170+ * You can also set them when initializing SDK with `options.serverURL `
170171 */
171- AV . setServerURLs = urls => AV . _setServerURLs ( urls ) ;
172+ AV . setServerURL = urls => AV . _setServerURLs ( urls ) ;
173+ AV . setServerURLs = AV . setServerURL ;
172174
173175AV . keepErrorRawMessage = value => {
174176 AV . _sharedConfig . keepErrorRawMessage = value ;
0 commit comments