mirror of
https://github.com/ragestudio/comty.js.git
synced 2025-06-09 02:24:18 +00:00
added disableAccount
method
This commit is contained in:
parent
4ebe77a0d7
commit
4f15559a09
@ -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
|
||||
}
|
||||
}
|
@ -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",
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user