advplyr.audiobookshelf-app/middleware/authenticated.js

6 lines
185 B
JavaScript
Raw Permalink Normal View History

2021-09-01 20:07:11 -05:00
export default function ({ store, redirect, route }) {
// If the user is not authenticated
if (!store.state.user.user) {
return redirect(`/connect?redirect=${route.path}`)
}
}