nextcloud/apps/twofactor_backupcodes/src/service/BackupCodesService.js
Roeland Jago Douma 0971232050
Provide initial state for backupcodes in template
This saves a direct request to the server when loading the backup codes.
There is no need for this as the data is already known.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-01-15 20:45:42 +01:00

7 lines
203 B
JavaScript

import Axios from 'nextcloud-axios'
export function generateCodes () {
const url = OC.generateUrl('/apps/twofactor_backupcodes/settings/create');
return Axios.post(url, {}).then(resp => resp.data)
}