Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/twofactor_gateway.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/service/registration.js')
-rw-r--r--js/service/registration.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/service/registration.js b/js/service/registration.js
index a6aa230..dddfc26 100644
--- a/js/service/registration.js
+++ b/js/service/registration.js
@@ -40,3 +40,16 @@ export function tryVerification(code) {
throw resp;
})
}
+
+export function disable() {
+ let url = OC.generateUrl('/apps/twofactor_sms/settings/verification')
+
+ return nc_fetch_json(url, {
+ method: 'DELETE'
+ }).then(function (resp) {
+ if (resp.ok) {
+ return resp.json();
+ }
+ throw resp;
+ })
+}