Remove error catching to let the interceptor do the job

This commit is contained in:
Bubka 2020-02-02 22:58:29 +01:00
parent d0d87961e1
commit ad6091c392

View File

@ -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.$parent.isActive = true
this.type === 'totp' ? await this.getTOTP() : await this.getHOTP()
this.$parent.isActive = true
})
.catch(error => {
this.$router.push({ name: 'genericError', params: { err: error.response } });
});
}, },
getTOTP: function() { getTOTP: function() {