Skip to content

Commit

Permalink
Change component validator to the correct asset id we're passing in t…
Browse files Browse the repository at this point in the history
…he API call
  • Loading branch information
inietov committed Jul 28, 2023
1 parent af86c61 commit 0a841dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/ComponentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function checkout(Request $request, $componentId)
$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(),
]);

Expand Down

0 comments on commit 0a841dd

Please sign in to comment.