fix: send a dial code on login

This commit is contained in:
saparatayev 2022-01-18 15:21:04 +05:00
parent 1b581dcf50
commit d6eea47592
4 changed files with 6 additions and 1 deletions

View File

@ -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();

View File

@ -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: {

View File

@ -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: {

View File

@ -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',