diff options
Diffstat (limited to 'apps/twofactor_backupcodes/src/service/BackupCodesService.js')
-rw-r--r-- | apps/twofactor_backupcodes/src/service/BackupCodesService.js | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/apps/twofactor_backupcodes/src/service/BackupCodesService.js b/apps/twofactor_backupcodes/src/service/BackupCodesService.js index c7259e826a1..62e69ead68f 100644 --- a/apps/twofactor_backupcodes/src/service/BackupCodesService.js +++ b/apps/twofactor_backupcodes/src/service/BackupCodesService.js @@ -1,21 +1,13 @@ -import axio from 'axios'; +import Axios from 'nextcloud-axios' export function getState () { const url = OC.generateUrl('/apps/twofactor_backupcodes/settings/state'); - return axio.get(url, { - headers: { - requesttoken: OC.requestToken - } - }).then(resp => resp.data); + return Axios.get(url).then(resp => resp.data); } export function generateCodes () { const url = OC.generateUrl('/apps/twofactor_backupcodes/settings/create'); - return axio.post(url, {}, { - headers: { - requesttoken: OC.requestToken - } - }).then(resp => resp.data) + return Axios.post(url, {}).then(resp => resp.data) } |