mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-18 09:29:46 +02:00
Set global axios instance using vue-axios wrapper
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
|
||||
this.id = id
|
||||
|
||||
axios.get('api/twofaccounts/' + this.id)
|
||||
this.axios.get('api/twofaccounts/' + this.id)
|
||||
.then(async (response) => {
|
||||
|
||||
this.service = response.data.service
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
getTOTP: function() {
|
||||
|
||||
axios.get('api/twofaccounts/' + this.id + '/otp').then(response => {
|
||||
this.axios.get('api/twofaccounts/' + this.id + '/otp').then(response => {
|
||||
let spacePosition = Math.ceil(response.data.otp.length / 2);
|
||||
|
||||
this.otp = response.data.otp.substr(0, spacePosition) + " " + response.data.otp.substr(spacePosition);
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
getHOTP: function() {
|
||||
|
||||
axios.get('api/twofaccounts/' + this.id + '/otp').then(response => {
|
||||
this.axios.get('api/twofaccounts/' + this.id + '/otp').then(response => {
|
||||
let spacePosition = Math.ceil(response.data.otp.length / 2);
|
||||
|
||||
this.otp = response.data.otp.substr(0, spacePosition) + " " + response.data.otp.substr(spacePosition);
|
||||
|
Reference in New Issue
Block a user