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

@@ -40,7 +40,7 @@ class NotificationController extends Controller
->get();
}
return response()->json(['status' => 'success', 'data' => $notifications, 'message' => $notifications]);
return response()->json(['status' => 'success', 'message' => $notifications]);
}
/** PUT /v2/notifications/{id}/read */
@@ -109,7 +109,7 @@ class NotificationController extends Controller
}
if ($userType === 'driver') {
DB::connection('primary')->table('captainToken')
DB::connection('primary')->table('driverToken')
->updateOrInsert(
['captain_id' => $userId],
[
@@ -144,7 +144,7 @@ class NotificationController extends Controller
}
if ($userType === 'driver') {
$data = DB::connection('primary')->table('captainToken')
$data = DB::connection('primary')->table('driverToken')
->where('captain_id', $userId)
->first();
} else {
@@ -159,7 +159,7 @@ class NotificationController extends Controller
return response()->json([
'status' => 'success',
'data' => [
'message' => [
'token' => $data->token,
'fingerPrint' => $data->fingerPrint ?? null,
]