frontend/src/components/sharing/linkSharingAuth.vue

40 lines
681 B
Vue
Raw Normal View History

2019-09-09 17:55:43 +00:00
<template>
2019-11-03 12:44:40 +00:00
<div class="message is-centered is-info" v-if="loading">
<div class="message-header">
<p class="has-text-centered">
Authenticating...
</p>
</div>
</div>
2019-09-09 17:55:43 +00:00
</template>
<script>
2019-11-03 12:44:40 +00:00
import auth from '../../auth'
import router from '../../router'
2019-09-09 17:55:43 +00:00
2019-11-03 12:44:40 +00:00
export default {
name: 'linkSharingAuth',
data() {
return {
hash: '',
loading: true,
}
},
created() {
this.auth()
},
methods: {
auth() {
auth.linkShareAuth(this.$route.params.share)
.then((r) => {
this.loading = false
router.push({name: 'showList', params: {id: r.listId}})
2019-11-03 12:44:40 +00:00
})
.catch(e => {
this.error(e, this)
2019-11-03 12:44:40 +00:00
})
}
},
}
2019-09-09 17:55:43 +00:00
</script>