Skip to content

Commit

Permalink
POST update-session-started-at on login
Browse files Browse the repository at this point in the history
  • Loading branch information
vdvibhu20 committed Mar 8, 2024
1 parent 6b0d01b commit 493058e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ export default {
class: 'pt-0'
}
},
mounted() {
async mounted() {
if(process.client) {
const redirectionPath = localStorage.getItem('redirectionPath')
if(this.$store.state.session.user) {
if(this.$route.query?.flow === 'login') {
await this.$axios.post('/users/update-session-started-at')
}
if(redirectionPath) {
localStorage.removeItem('redirectionPath')
window.location.href = redirectionPath
Expand Down

0 comments on commit 493058e

Please sign in to comment.