mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Remove code handled by CompanyableChildTrait
This commit is contained in:
parent
872b76b45f
commit
5299b3e9f0
|
@ -188,10 +188,6 @@ class AssetMaintenancesController extends Controller
|
||||||
// Check if the asset maintenance exists
|
// Check if the asset maintenance exists
|
||||||
$assetMaintenance = AssetMaintenance::findOrFail($assetMaintenanceId);
|
$assetMaintenance = AssetMaintenance::findOrFail($assetMaintenanceId);
|
||||||
|
|
||||||
if (! Company::isCurrentUserHasAccess($assetMaintenance->asset)) {
|
|
||||||
return response()->json(Helper::formatStandardApiResponse('error', null, 'You cannot delete a maintenance for that asset'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$assetMaintenance->delete();
|
$assetMaintenance->delete();
|
||||||
|
|
||||||
return response()->json(Helper::formatStandardApiResponse('success', $assetMaintenance, trans('admin/asset_maintenances/message.delete.success')));
|
return response()->json(Helper::formatStandardApiResponse('success', $assetMaintenance, trans('admin/asset_maintenances/message.delete.success')));
|
||||||
|
|
Loading…
Reference in a new issue