mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Added legacy comment
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
2dcae780c0
commit
b247fc33b9
|
@ -196,7 +196,7 @@ class AssetMaintenancesController extends Controller
|
||||||
if (! Company::isCurrentUserHasAccess($assetMaintenance->asset)) {
|
if (! Company::isCurrentUserHasAccess($assetMaintenance->asset)) {
|
||||||
return response()->json(Helper::formatStandardApiResponse('error', null, 'You cannot delete a maintenance for that 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')));
|
||||||
|
|
|
@ -231,6 +231,7 @@ class ConsumablesController extends Controller
|
||||||
'name' => ($consumable_assignment->user) ? $consumable_assignment->user->present()->nameUrl() : 'Deleted User',
|
'name' => ($consumable_assignment->user) ? $consumable_assignment->user->present()->nameUrl() : 'Deleted User',
|
||||||
'created_at' => Helper::getFormattedDateObject($consumable_assignment->created_at, 'datetime'),
|
'created_at' => Helper::getFormattedDateObject($consumable_assignment->created_at, 'datetime'),
|
||||||
'note' => ($consumable_assignment->note) ? e($consumable_assignment->note) : null,
|
'note' => ($consumable_assignment->note) ? e($consumable_assignment->note) : null,
|
||||||
|
'admin' => ($consumable_assignment->admin) ? $consumable_assignment->admin->present()->nameUrl() : null, // legacy, so we don't change the shape of the response
|
||||||
'created_by' => ($consumable_assignment->admin) ? $consumable_assignment->admin->present()->nameUrl() : null,
|
'created_by' => ($consumable_assignment->admin) ? $consumable_assignment->admin->present()->nameUrl() : null,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue