Cleanup, removing unnecessary log types on restores

This commit is contained in:
Brady Wetherington 2025-02-23 12:44:12 +00:00
parent 27ac7f772a
commit 23c4d82c92
5 changed files with 0 additions and 5 deletions

View file

@ -217,7 +217,6 @@ class ManufacturersController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', trans('general.not_deleted', ['item_type' => trans('general.manufacturer')])), 200);
}
$manufacturer->setLogMessage('restore');
if ($manufacturer->restore()) {
return response()->json(Helper::formatStandardApiResponse('success', trans('admin/manufacturers/message.restore.success')), 200);

View file

@ -746,7 +746,6 @@ class UsersController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', trans('general.not_deleted', ['item_type' => trans('general.user')])), 200);
}
$user->setLogMessage(ActionType::Restore);
if ($user->restore()) {
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/users/message.success.restored')), 200);

View file

@ -225,7 +225,6 @@ class AssetModelsController extends Controller
return redirect()->back()->with('error', trans('general.not_deleted', ['item_type' => trans('general.asset_model')]));
}
$model->setLogMessage(ActionType::Restore);
if ($model->restore()) {
// Redirect them to the deleted page if there are more, otherwise the section index

View file

@ -266,7 +266,6 @@ class LocationsController extends Controller
return redirect()->back()->with('error', trans('general.not_deleted', ['item_type' => trans('general.location')]));
}
$location->setLogMessage(ActionType::Restore);
if ($location->restore()) {
return redirect()->route('locations.index')->with('success', trans('admin/locations/message.restore.success'));

View file

@ -195,7 +195,6 @@ class ManufacturersController extends Controller
return redirect()->back()->with('error', trans('general.not_deleted', ['item_type' => trans('general.manufacturer')]));
}
$manufacturer->setLogMessage(ActionType::Restore);
if ($manufacturer->restore()) {
// Redirect them to the deleted page if there are more, otherwise the section index