mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-20 11:47:53 +02:00
Remove error catching to let the interceptor do the job
This commit is contained in:
parent
d0d87961e1
commit
ad6091c392
@ -33,24 +33,20 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
getAccount: function(id) {
|
async getAccount(id) {
|
||||||
|
|
||||||
this.id = id
|
this.id = id
|
||||||
|
|
||||||
this.axios.get('api/twofaccounts/' + this.id)
|
const { data } = await this.axios.get('api/twofaccounts/' + this.id)
|
||||||
.then(async (response) => {
|
|
||||||
|
|
||||||
this.service = response.data.service
|
this.service = data.service
|
||||||
this.account = response.data.account
|
this.account = data.account
|
||||||
this.icon = response.data.icon
|
this.icon = data.icon
|
||||||
this.type = response.data.type
|
this.type = data.type
|
||||||
|
|
||||||
this.type === 'totp' ? await this.getTOTP() : await this.getHOTP()
|
this.type === 'totp' ? await this.getTOTP() : await this.getHOTP()
|
||||||
this.$parent.isActive = true
|
this.$parent.isActive = true
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
this.$router.push({ name: 'genericError', params: { err: error.response } });
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getTOTP: function() {
|
getTOTP: function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user