Change component validator to the correct asset id we're passing in the API call

This commit is contained in:
Ivan Nieto Vivanco 2023-07-27 20:22:13 -06:00
parent af86c6138d
commit 0a841ddbb8

View file

@ -235,7 +235,7 @@ class ComponentsController extends Controller
$this->authorize('checkout', $component);
$validator = Validator::make($request->all(), [
'asset_id' => 'required|exists:assets,id',
'assigned_to' => 'required|exists:assets,id',
'assigned_qty' => "required|numeric|min:1|digits_between:1,".$component->numRemaining(),
]);