Add minimal validation for asset_tags

This commit is contained in:
Marcus Moore 2024-03-12 12:00:10 -07:00
parent 693d1c9452
commit 0fcf223960
No known key found for this signature in database

View file

@ -102,6 +102,10 @@ class AssetsController extends Controller
{
$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.
// This is only necessary on create, not update, since bulk editing is handled
// differently