Skip to content

Commit

Permalink
fix api url on verify page
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfrase3 committed Oct 15, 2023
1 parent f04b1dc commit 3bde81f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/views/Verify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ export default {
loading: true,
};
},
computed: {
apiUrl() {
let apiUrl = process.env.VUE_APP_API_URL;
if (apiUrl === '/') apiUrl = window.location.origin;
if (!/\/$/.test(apiUrl)) apiUrl = `${apiUrl}/`;
},
},
mounted() {
this.verify();
},
Expand All @@ -53,7 +60,7 @@ export default {
return null;
}
try {
await fetch(`${process.env.VUE_APP_API_URL}/tokens-actions/${token}`);
await fetch(`${this.apiUrl}tokens-actions/${token}`);
this.title = '🎉 Success!';
switch (action) {
case 'verify_preferred_email':
Expand Down

0 comments on commit 3bde81f

Please sign in to comment.