This repository has been archived on 2025-05-09. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Astral-nook/resources/scripts/api/account/disableAccountTwoFactor.ts
Matthew Penner 75b59080e2
fix!: use POST instead of DELETE when disabling 2FA
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-10-24 11:30:24 -06:00

11 lines
334 B
TypeScript

import http from '@/api/http';
function disableAccountTwoFactor(password: string): Promise<void> {
return new Promise((resolve, reject) => {
http.post('/api/client/account/two-factor/disable', { password })
.then(() => resolve())
.catch(reject);
});
}
export default disableAccountTwoFactor;