mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 22:37:28 -08:00
Add minimal validation for asset_tags
This commit is contained in:
parent
693d1c9452
commit
0fcf223960
|
@ -102,6 +102,10 @@ class AssetsController extends Controller
|
||||||
{
|
{
|
||||||
$this->authorize(Asset::class);
|
$this->authorize(Asset::class);
|
||||||
|
|
||||||
|
// There are a lot more rules to add here but prevents
|
||||||
|
// errors around `asset_tags` not being present below.
|
||||||
|
$this->validate($request, ['asset_tags' => ['required', 'array']]);
|
||||||
|
|
||||||
// Handle asset tags - there could be one, or potentially many.
|
// Handle asset tags - there could be one, or potentially many.
|
||||||
// This is only necessary on create, not update, since bulk editing is handled
|
// This is only necessary on create, not update, since bulk editing is handled
|
||||||
// differently
|
// differently
|
||||||
|
|
Loading…
Reference in a new issue