fix!: use POST instead of DELETE when disabling 2FA

Signed-off-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
Matthew Penner 2024-10-24 11:30:24 -06:00
parent 3a0b7d13a9
commit 75b59080e2
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View file

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