added disableAccount method

This commit is contained in:
SrGooglo 2024-11-04 13:02:48 +00:00
parent 4ebe77a0d7
commit 4f15559a09
2 changed files with 17 additions and 1 deletions

View File

@ -228,4 +228,20 @@ export default class AuthModel {
return data
}
static async disableAccount({ confirm = false } = {}) {
if (!confirm) {
console.error("In order to disable your account, you must confirm the action.")
return null
}
const { data } = await request({
method: "post",
url: "/auth/disable-account",
})
__comty_shared_state.eventBus.emit("auth:disabled_account")
return data
}
}

View File

@ -1,5 +1,5 @@
const envOrigins = {
"development": `${location.origin}/api`,
"development": `https://fr01.ragestudio.net:9000`,//`${location.origin}/api`,
"indev": "https://indev.comty.app/api",
"production": "https://api.comty.app",
}