Skip to content

Commit 41cb566

Browse files
committed
feat(user): add failOnNotExist option for loginWithWeapp
1 parent 7585366 commit 41cb566

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/user.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -983,11 +983,13 @@ module.exports = function(AV) {
983983
* 仅在小程序中可用。
984984
*
985985
* @since 2.0.0
986-
* @return {AV.User}
986+
* @param {Object} [options]
987+
* @param {boolean} [options.failOnNotExist] If true, the login request will fail when no user matches this authData exists. (since v3.7.0)
988+
* @return {Promise.<AV.User>}
987989
*/
988-
loginWithWeapp() {
990+
loginWithWeapp(options) {
989991
return getWeappLoginCode().then(code =>
990-
this.loginWithAuthData({ code }, 'lc_weapp')
992+
this.loginWithAuthData({ code }, 'lc_weapp', options)
991993
);
992994
},
993995

0 commit comments

Comments
 (0)