fix: send a dial code on login
This commit is contained in:
parent
1b581dcf50
commit
d6eea47592
|
|
@ -41,6 +41,7 @@ class RequestController extends Controller
|
|||
$rules = [
|
||||
'phone' => ['required'],
|
||||
'password' => ['required'],
|
||||
'dial_code' => ['required'],
|
||||
'items' => ['required', 'array'],
|
||||
'items.*.id' => ['required'],
|
||||
'totalPrice' => ['required', 'numeric'],
|
||||
|
|
@ -56,7 +57,8 @@ class RequestController extends Controller
|
|||
|
||||
$loginResponse = Http::post('http://127.0.0.1:8000/api/login', [
|
||||
'username' => $input['phone'],
|
||||
'password' => $input['password']
|
||||
'password' => $input['password'],
|
||||
'dial_code' => '+' . $input['dial_code']
|
||||
]);
|
||||
|
||||
$loginResponseStatus = $loginResponse->status();
|
||||
|
|
|
|||
|
|
@ -967,6 +967,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||
this.loader = true;
|
||||
this.form.totalPrice = this.totalPrice;
|
||||
this.form.currency = this.currency;
|
||||
this.form.dial_code = this.countryCode;
|
||||
fetch(this.route('requests.store'), {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -967,6 +967,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||
this.loader = true;
|
||||
this.form.totalPrice = this.totalPrice;
|
||||
this.form.currency = this.currency;
|
||||
this.form.dial_code = this.countryCode;
|
||||
fetch(this.route('requests.store'), {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ export default {
|
|||
|
||||
this.form.totalPrice = this.totalPrice
|
||||
this.form.currency = this.currency
|
||||
this.form.dial_code = this.countryCode
|
||||
|
||||
fetch(this.route('requests.store'), {
|
||||
method: 'POST',
|
||||
|
|
|
|||
Loading…
Reference in New Issue