panel/resources/scripts/api/account/disableAccountTwoFactor.ts
Matthew Penner 8be2b892c3
fix!: use POST instead of DELETE when disabling 2FA
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-10-24 11:27:42 -06:00

12 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;