1
0
Fork 0

feat(org): Added restrict/remove account

This commit is contained in:
joostdecock 2023-08-20 18:04:26 +02:00
parent 5d1249c419
commit 2b4d5c240a
9 changed files with 338 additions and 8 deletions

View file

@ -152,37 +152,49 @@ Backend.prototype.confirmMfa = async function (data) {
* Disable MFA
*/
Backend.prototype.disableMfa = async function (data) {
return responseHandler(
await await api.post(`/account/mfa/jwt`, { ...data, mfa: false }, this.auth)
)
return responseHandler(await api.post(`/account/mfa/jwt`, { ...data, mfa: false }, this.auth))
}
/*
* Reload account
*/
Backend.prototype.reloadAccount = async function () {
return responseHandler(await await api.get(`/whoami/jwt`, this.auth))
return responseHandler(await api.get(`/whoami/jwt`, this.auth))
}
/*
* Export account data
*/
Backend.prototype.exportAccount = async function () {
return responseHandler(await await api.get(`/account/export/jwt`, this.auth))
return responseHandler(await api.get(`/account/export/jwt`, this.auth))
}
/*
* Restrict processing of account data
*/
Backend.prototype.restrictAccount = async function () {
return responseHandler(await api.get(`/account/restrict/jwt`, this.auth))
}
/*
* Remove account
*/
Backend.prototype.restrictAccount = async function () {
return responseHandler(await api.delete(`/account/jwt`, this.auth))
}
/*
* Load all user data
*/
Backend.prototype.getUserData = async function (uid) {
return responseHandler(await await api.get(`/users/${uid}/jwt`, this.auth))
return responseHandler(await api.get(`/users/${uid}/jwt`, this.auth))
}
/*
* Load user profile
*/
Backend.prototype.getProfile = async function (uid) {
return responseHandler(await await api.get(`/users/${uid}`))
return responseHandler(await api.get(`/users/${uid}`))
}
/*