Chatwoot/app/javascript/dashboard/routes/auth/Confirmation.vue
Pranav Raj S 7bb8186e43
chore: Update self-closing tag eslint config (#4826)
* chore: Fix self-closing tag issues

* Fix merge conflicts

Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
2022-06-10 19:29:52 +05:30

34 lines
738 B
Vue

<template>
<loading-state :message="$t('CONFIRM_EMAIL')" />
</template>
<script>
import LoadingState from '../../components/widgets/LoadingState';
import Auth from '../../api/auth';
import { DEFAULT_REDIRECT_URL } from '../../constants';
export default {
components: {
LoadingState,
},
props: {
confirmationToken: {
type: String,
default: '',
},
},
mounted() {
this.confirmToken();
},
methods: {
async confirmToken() {
try {
await Auth.verifyPasswordToken({
confirmationToken: this.confirmationToken,
});
window.location = DEFAULT_REDIRECT_URL;
} catch (error) {
window.location = DEFAULT_REDIRECT_URL;
}
},
},
};
</script>