Applied manual JWT check and restored all driver fields2

This commit is contained in:
Hamza-Ayed
2026-04-25 13:32:35 +03:00
parent e306217806
commit ee9c0f3a04
11 changed files with 36 additions and 257 deletions

View File

@@ -19,7 +19,6 @@ use App\Http\Controllers\AuthController;
use App\Http\Controllers\RideController;
use App\Http\Controllers\TrackingController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\WalletController;
use App\Http\Controllers\RatingController;
use App\Http\Controllers\PromoController;
use App\Http\Controllers\OtpController;
@@ -114,12 +113,9 @@ Route::prefix('v2')->middleware(['hmac.auth', 'jwt.auth'])->group(function () {
Route::match(['post', 'put'], '/profile/driver/email', [ProfileController::class, 'updateDriverEmail']);
// ── Wallet ──
Route::get('/wallet/passenger', [WalletController::class, 'index']);
Route::get('/wallet/passenger/balance', [WalletController::class, 'balance']);
Route::post('/wallet/passenger', [WalletController::class, 'addFunds']);
Route::put('/wallet/passenger', [WalletController::class, 'update']);
Route::get('/wallet/passenger/transactions', [WalletController::class, 'transactions']);
Route::post('/wallet/passenger/token', [WalletController::class, 'addToken']);
// All wallet operations (balance, funds, transactions) are handled by the
// dedicated payment server. V2 only generates 60-second JWT tokens for it
// via POST /v2/auth/passenger/wallet-login and /v2/auth/driver/wallet-login.
// ── Ratings ──
Route::post('/ratings/driver', [RatingController::class, 'rateDriver']);
@@ -156,7 +152,8 @@ Route::prefix('v2')->middleware(['hmac.auth', 'jwt.auth'])->group(function () {
Route::post('/notifications/update', [NotificationController::class, 'updateNotification']);
Route::get('/notifications/token', [NotificationController::class, 'getToken']);
Route::post('/notifications/token', [NotificationController::class, 'updateToken']);
Route::put('/notifications/{id}/read', [NotificationController::class, 'markRead']);
Route::match(['put', 'post'], '/notifications/driver/read', [NotificationController::class, 'updateNotification']);
Route::match(['put', 'post'], '/notifications/{id}/read', [NotificationController::class, 'markRead']);
// ── Misc ──
Route::get('/misc/test', [MiscController::class, 'test']);