Hey there, I'm in need of extracting a token from the URL
http://192.168.178.25:8080/register?token=eyJhbGciOiJIUzI...
and then making a POST request to the API to confirm the account.
I've attempted this but encountered a SyntaxError on the backend!
Can anyone lend a hand?
<script>
import axios from 'axios'
export default {
name: 'Register',
data() {
return {
confirmation : false,
somethingWrong: false
}
},
created: function() {
axios.post('/api/users/validateRegister', null,{
params: {
registerToken: this.$route.query.token,
state: this.$route.query.state
}
})
.then((res) => {
console.log(res)
this.confirmation = true
})
.catch((err) => {
console.log(err)
this.somethingWrong = true
})
}
}
</script>