Skip to content

Commit

Permalink
accepted to boolean (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
niekbr authored Apr 30, 2024
1 parent 33d592d commit ac1d401
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Http/Controllers/CashRegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function setAsPaid(SetAsPaidRequest $request)
$productItem = $this->getExternalProductItem($request->validated('type'), $request->validated('id'));

$success = $productItem->setAsExternallyPaid();
if ($success && ! is_null($request->validated('completed'))) {
if ($success && $request->validated('completed')) {
$productItem->setAsCompleted();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Requests/SetAsPaidRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function rules()
return [
'type' => 'required',
'id' => 'required|numeric|min:1',
'completed' => 'nullable|accepted',
'completed' => 'nullable|boolean',
];
}
}

0 comments on commit ac1d401

Please sign in to comment.