summaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/src/service/BackupCodesService.js
blob: 62e69ead68f686e7f7748d45930a9eba486b2245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import Axios from 'nextcloud-axios'

export function getState () {
	const url = OC.generateUrl('/apps/twofactor_backupcodes/settings/state');

	return Axios.get(url).then(resp => resp.data);
}

export function generateCodes () {
	const url = OC.generateUrl('/apps/twofactor_backupcodes/settings/create');

	return Axios.post(url, {}).then(resp => resp.data)
}