Skip to content

Commit

Permalink
Add redirect after login
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Aug 16, 2022
1 parent 5581ac7 commit b9d4aec
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/web-runtime/src/pages/resolvePublicLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default defineComponent({
}
},
computed: {
...mapGetters(['configuration', 'user']),
...mapGetters(['configuration']),
pageTitle() {
return this.$gettext(this.$route.meta.title)
Expand Down Expand Up @@ -181,10 +181,13 @@ export default defineComponent({
try {
publicLink = await this.loadPublicLinkTask.perform()
} catch (e) {
} catch (error) {
if (error.statusCode !== 404) {
throw error
}
// alias link
if (!this.isLoggedInUser) {
// @TODO add redirect to the actual route
await authService.loginUser(queryItemAsString(`/files/spaces/personal/${fullPath}`))
return this.$router.push({ name: '/login' })
}
Expand Down

0 comments on commit b9d4aec

Please sign in to comment.