Applied manual JWT check and restored all driver fields2
This commit is contained in:
@@ -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,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user