Skip to content

Commit

Permalink
feat(mellow-vue): replace call to sails.inertia.location with the ine…
Browse files Browse the repository at this point in the history
…rtiaRedirect custom response
  • Loading branch information
DominusKelvin committed Feb 29, 2024
1 parent e503424 commit ee39cee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/mellow-vue/api/controllers/user/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ module.exports = {
inputs: {},

exits: {
success: {}
success: {
responseType: 'inertiaRedirect'
}
},

fn: async function () {
sails.inertia.flushShared('loggedInUser')
delete this.req.session.userId
return sails.inertia.location('/')
return '/'
}
}

0 comments on commit ee39cee

Please sign in to comment.