This commit is contained in:
les 2020-01-15 23:42:44 +01:00
parent 8e30973f3a
commit 3ff4b9dcef

View file

@ -25,21 +25,20 @@ export default {
layout: 'modal',
name: 'Authorize',
middleware: ['auth'],
head: { title: 'Authorize' },
data () {
return {
client: { name: 'Test' }
}
},
async asyncData ({ $axios, query }) {
// retrieve client validity
try {
const client = await $axios.$get(`/client/${query.client_id}`)
return { client }
} catch(e) {
} catch (e) {
console.error(e)
}
},
data () {
return {
client: { name: 'Test' }
}
},
computed: {
...mapState(['settings']),
authorizeURL () {
@ -48,5 +47,8 @@ export default {
return `oauth/authorize?${query}`
}
},
head () {
return { title: `${this.settings.title} - Authorize` }
}
}
</script>