From 75b59080e2812ced677dab516222b2a3bb34e3a4 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Thu, 24 Oct 2024 11:30:24 -0600 Subject: [PATCH 1/2] fix!: use `POST` instead of `DELETE` when disabling 2FA Signed-off-by: Matthew Penner --- resources/scripts/api/account/disableAccountTwoFactor.ts | 8 +++++--- routes/api-client.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/scripts/api/account/disableAccountTwoFactor.ts b/resources/scripts/api/account/disableAccountTwoFactor.ts index 2b41fe20..fe806400 100644 --- a/resources/scripts/api/account/disableAccountTwoFactor.ts +++ b/resources/scripts/api/account/disableAccountTwoFactor.ts @@ -1,9 +1,11 @@ import http from '@/api/http'; -export default (password: string): Promise => { +function disableAccountTwoFactor(password: string): Promise { 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; diff --git a/routes/api-client.php b/routes/api-client.php index 64ceecf3..6887f1b2 100644 --- a/routes/api-client.php +++ b/routes/api-client.php @@ -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'); From bd2fa8d3cbed29bb8ba3d7622ab12d7e18342ec5 Mon Sep 17 00:00:00 2001 From: Pterodactyl CI Date: Thu, 24 Oct 2024 17:32:22 +0000 Subject: [PATCH 2/2] ci(release): bump version --- config/app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php b/config/app.php index c3764619..48b48268 100644 --- a/config/app.php +++ b/config/app.php @@ -11,7 +11,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => 'canary', + 'version' => '1.11.8', /* |--------------------------------------------------------------------------