This commit is contained in:
David Bomba 2023-12-09 09:42:15 +11:00
parent 82bcd84c43
commit 6727f602a1

View File

@ -21,6 +21,7 @@ use Twilio\Rest\Client;
class TwilioController extends BaseController class TwilioController extends BaseController
{ {
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
@ -38,6 +39,10 @@ class TwilioController extends BaseController
$account = $user->company()->account; $account = $user->company()->account;
if(stripos($request->phone, '+21') !== false) {
return response()->json(['message' => 'This phone number is not supported'], 400);
}
if (MultiDB::hasPhoneNumber($request->phone)) { if (MultiDB::hasPhoneNumber($request->phone)) {
return response()->json(['message' => 'This phone number has already been verified with another account'], 400); return response()->json(['message' => 'This phone number has already been verified with another account'], 400);
} }