verify-email
This commit is contained in:
parent
3bb91201d8
commit
4a8bad8002
2 changed files with 42 additions and 2 deletions
|
|
@ -79,7 +79,7 @@ const router = createRouter({
|
|||
},
|
||||
},
|
||||
{
|
||||
path: "/verifyemail",
|
||||
path: "/verifyemail/:token",
|
||||
name: "verifyemail",
|
||||
component: VerifyEmail,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,44 @@
|
|||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import axios from "axios";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute } from "vue-router";
|
||||
import env from "@/api/index";
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const { showLoader, hideLoader, messageError } = useCounterMixin();
|
||||
|
||||
const pathApi = ref<string>(`${env.API_URI}/profile/verify-email`);
|
||||
const token = ref(route.params.token);
|
||||
|
||||
async function fetchCheckVerifEemail() {
|
||||
showLoader();
|
||||
await axios
|
||||
.post(
|
||||
pathApi.value,
|
||||
{ token: token.value },
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": "application/json; charset=utf-8",
|
||||
},
|
||||
}
|
||||
)
|
||||
.then(() => {})
|
||||
.catch((err) => {
|
||||
// messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchCheckVerifEemail();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue