summaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/src
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-01-09 09:30:10 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-01-09 09:30:10 +0100
commit9ccdc0a75c1c47c1cda1d0e76fc37c2d6bbb2aa0 (patch)
tree26be7ee867b0e26faf3070f6a95eac2fef8dbdc3 /apps/twofactor_backupcodes/src
parent057fab2e505923140fc7f7d8715a9974e0768cbb (diff)
downloadnextcloud-server-9ccdc0a75c1c47c1cda1d0e76fc37c2d6bbb2aa0.tar.gz
nextcloud-server-9ccdc0a75c1c47c1cda1d0e76fc37c2d6bbb2aa0.zip
Use nextcloud-axios in 2fa backupcodes js
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/twofactor_backupcodes/src')
-rw-r--r--apps/twofactor_backupcodes/src/service/BackupCodesService.js14
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)
}