Browse Source

fix: change to new api

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
pull/1829/head
Wing-Kam Wong 3 years ago
parent
commit
58b09821d0
  1. 19
      packages/nc-gui/pages/user/password/forgot.vue

19
packages/nc-gui/pages/user/password/forgot.vue

@ -97,23 +97,26 @@ export default {
beforeDestroy() {
},
methods: {
onNormalVerify() {
this.recpatcha = true
},
async resetPasswordHandle(e) {
if (this.$refs.formType.validate()) {
e.preventDefault()
// await this.$recaptchaLoaded()
// const recaptchaToken = await this.$recaptcha('login')
const err = await this.$store.dispatch('users/ActPasswordForgot', { ...this.form })// recaptchaToken});
if (err) {
this.formUtil.formErr = true
this.formUtil.formErrMsg = err.data.msg
} else {
try {
await this.$api.auth.passwordForgot(
{
email: this.form.email
}
)
this.showMsg = true
} catch (e) {
const err = await this._extractSdkResponseErrorMsg(e)
this.formUtil.formErr = true
this.formUtil.formErrMsg = err
return;
}
}
}

Loading…
Cancel
Save