mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-22 00:52:43 +01:00
fix!: use POST
instead of DELETE
when disabling 2FA
Signed-off-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
parent
8ca098940a
commit
8be2b892c3
@ -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;
|
||||
|
@ -24,7 +24,7 @@ Route::prefix('/account')->middleware(AccountSubject::class)->group(function ()
|
||||
Route::get('/', [Client\AccountController::class, 'index'])->name('api:client.account');
|
||||
Route::get('/two-factor', [Client\TwoFactorController::class, 'index']);
|
||||
Route::post('/two-factor', [Client\TwoFactorController::class, 'store']);
|
||||
Route::delete('/two-factor', [Client\TwoFactorController::class, 'delete']);
|
||||
Route::post('/two-factor/disable', [Client\TwoFactorController::class, 'delete']);
|
||||
});
|
||||
|
||||
Route::put('/email', [Client\AccountController::class, 'updateEmail'])->name('api:client.account.update-email');
|
||||
|
Loading…
Reference in New Issue
Block a user