Skip to content

Commit 35e4663

Browse files
committed
feat: require mobilePhoneNumber
1 parent b88f4ea commit 35e4663

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 4.15.3 (2024-07-01)
2+
3+
### Bug Fixes
4+
5+
- `resetPasswordBySmsCode``verifyMobilePhone` 支持传递 mobilePhoneNumber 参数。
6+
17
## 4.15.2 (2023-10-11)
28

39
### Internal Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "leancloud-storage",
3-
"version": "4.15.2",
3+
"version": "4.15.3",
44
"main": "./dist/node/entry/index.js",
55
"description": "LeanCloud JavaScript SDK.",
66
"repository": {

src/user.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,11 +1731,12 @@ module.exports = function(AV) {
17311731
* The sms code is sent by AV.User.requestPasswordResetBySmsCode.
17321732
* @param {String} code The sms code sent by AV.User.Cloud.requestSmsCode
17331733
* @param {String} password The new password.
1734+
* @param {String} mobilePhoneNumber
17341735
* @return {Promise} A promise that will be resolved with the result
17351736
* of the function.
17361737
*/
1737-
resetPasswordBySmsCode: function(code, password) {
1738-
var json = { password: password };
1738+
resetPasswordBySmsCode: function(code, password, mobilePhoneNumber) {
1739+
var json = { password: password, mobilePhoneNumber: mobilePhoneNumber };
17391740
var request = AVRequest(
17401741
'resetPasswordBySmsCode',
17411742
null,
@@ -1750,11 +1751,13 @@ module.exports = function(AV) {
17501751
* Makes a call to verify sms code that sent by AV.User.Cloud.requestSmsCode
17511752
* If verify successfully,the user mobilePhoneVerified attribute will be true.
17521753
* @param {String} code The sms code sent by AV.User.Cloud.requestSmsCode
1754+
* @param {String} mobilePhoneNumber
17531755
* @return {Promise} A promise that will be resolved with the result
17541756
* of the function.
17551757
*/
1756-
verifyMobilePhone: function(code) {
1757-
var request = AVRequest('verifyMobilePhone', null, code, 'POST', null);
1758+
verifyMobilePhone: function(code, mobilePhoneNumber) {
1759+
var json = { mobilePhoneNumber: mobilePhoneNumber };
1760+
var request = AVRequest('verifyMobilePhone', null, code, 'POST', json);
17581761
return request;
17591762
},
17601763

src/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = '4.15.2';
1+
module.exports = '4.15.3';

storage.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,14 @@ export class User extends Object {
800800
static resetPasswordBySmsCode(
801801
code: string,
802802
password: string,
803+
mobilePhoneNumber: string,
804+
options?: AuthOptions
805+
): Promise<User>;
806+
static verifyMobilePhone(
807+
code: string,
808+
mobilePhoneNumber: string,
803809
options?: AuthOptions
804810
): Promise<User>;
805-
static verifyMobilePhone(code: string, options?: AuthOptions): Promise<User>;
806811
static requestChangePhoneNumber(
807812
mobilePhoneNumber: string,
808813
ttl?: number,

0 commit comments

Comments
 (0)