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;