From b9520208909f5aca30499b563e2d3b4af69a7abe Mon Sep 17 00:00:00 2001 From: isaacclad Date: Fri, 12 Jun 2026 08:02:42 +0000 Subject: [PATCH] Fix auto-withdraw deploy and accept POST on wallet settings route. Drop the fragile column ordering in the migration and allow POST as well as PUT so the mobile clients can save auto-withdraw after deploy. Co-authored-by: Cursor --- ...2026_06_12_120000_add_auto_withdraw_to_qr_settings_table.php | 2 +- routes/api.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/database/migrations/2026_06_12_120000_add_auto_withdraw_to_qr_settings_table.php b/database/migrations/2026_06_12_120000_add_auto_withdraw_to_qr_settings_table.php index b17ca7e..dac2564 100644 --- a/database/migrations/2026_06_12_120000_add_auto_withdraw_to_qr_settings_table.php +++ b/database/migrations/2026_06_12_120000_add_auto_withdraw_to_qr_settings_table.php @@ -9,7 +9,7 @@ return new class extends Migration public function up(): void { Schema::table('qr_settings', function (Blueprint $table) { - $table->unsignedBigInteger('auto_withdraw_amount_minor')->nullable()->after('notify_payouts'); + $table->unsignedBigInteger('auto_withdraw_amount_minor')->nullable(); }); } diff --git a/routes/api.php b/routes/api.php index 2b6fcb0..c546bca 100644 --- a/routes/api.php +++ b/routes/api.php @@ -67,7 +67,7 @@ Route::prefix('v1')->group(function () { Route::put('/mini/wallet/payout-account', [MiniWalletController::class, 'updatePayoutAccount'])->name('api.mini.wallet.payout-account.update'); Route::get('/mini/wallet/withdrawals', [MiniWalletController::class, 'withdrawals'])->name('api.mini.wallet.withdrawals'); Route::post('/mini/wallet/withdraw', [MiniWalletController::class, 'withdraw'])->name('api.mini.wallet.withdraw'); - Route::put('/mini/wallet/auto-withdraw', [MiniWalletController::class, 'updateAutoWithdraw'])->name('api.mini.wallet.auto-withdraw'); + Route::match(['put', 'post'], '/mini/wallet/auto-withdraw', [MiniWalletController::class, 'updateAutoWithdraw'])->name('api.mini.wallet.auto-withdraw'); Route::get('/mini/support/tickets', [MiniSupportController::class, 'tickets'])->name('api.mini.support.tickets'); Route::post('/mini/support/tickets', [MiniSupportController::class, 'store'])->name('api.mini.support.tickets.store');