opnform/resources/js/middleware/subscribed.js

10 lines
175 B
JavaScript
Raw Normal View History

2022-09-20 19:59:52 +00:00
import store from '~/store'
export default (to, from, next) => {
if (!store.getters['auth/user'].is_subscribed) {
next({ name: 'pricing' })
} else {
next()
}
}