mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Cleanup, removing unnecessary log types on restores
This commit is contained in:
parent
27ac7f772a
commit
23c4d82c92
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue