Applied manual JWT check and restored all driver fields
This commit is contained in:
@@ -294,20 +294,21 @@ class OtpController extends Controller
|
||||
return $this->failure('Phone parameter is missing', 400);
|
||||
}
|
||||
|
||||
// We check phone_verification table (Legacy V1 style)
|
||||
$verified = DB::connection('primary')->table('phone_verification')
|
||||
->where('phone_number', $phone)
|
||||
->where('verified', 1) // In V1 it might be 'verified' or 'is_verified'
|
||||
->exists();
|
||||
|
||||
// Fallback for column name 'is_verified' if 'verified' fails
|
||||
if (!$verified) {
|
||||
try {
|
||||
$verified = DB::connection('primary')->table('phone_verification')
|
||||
->where('phone_number', $phone)
|
||||
->where('verified', 1) // In V1 it might be 'verified' or 'is_verified'
|
||||
->exists();
|
||||
} catch (\Exception $e) {
|
||||
// Fallback for column name 'is_verified' if 'verified' fails
|
||||
try {
|
||||
$verified = DB::connection('primary')->table('phone_verification')
|
||||
->where('phone_number', $phone)
|
||||
->where('is_verified', 1)
|
||||
->exists();
|
||||
} catch (\Exception $e) {}
|
||||
} catch (\Exception $e2) {
|
||||
$verified = false;
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
|
||||
Reference in New Issue
Block a user