-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: use
POST
instead of DELETE
when disabling 2FA
Signed-off-by: Matthew Penner <[email protected]>
- Loading branch information
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters