This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/components/sharing/linkSharingAuth.vue
konrad 1170e030f6
All checks were successful
continuous-integration/drone/push Build is passing
Use message mixin for handling success and error messages (#51)
Use message mixin everywhere

Add mixin for success and error messages

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #51
2020-01-30 21:47:08 +00:00

40 lines
682 B
Vue

<template>
<div class="message is-centered is-info" v-if="loading">
<div class="message-header">
<p class="has-text-centered">
Authenticating...
</p>
</div>
</div>
</template>
<script>
import auth from '../../auth'
import router from '../../router'
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.list_id}})
})
.catch(e => {
this.error(e, this)
})
}
},
}
</script>