mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-26 05:01:06 -08:00
delete some extra lines
This commit is contained in:
parent
e3e01e07b1
commit
e7b9903341
|
@ -631,7 +631,6 @@ class AssetsController extends Controller
|
|||
{
|
||||
$asset->fill($request->validated());
|
||||
|
||||
|
||||
if ($request->has('model_id')) {
|
||||
$asset->model()->associate(AssetModel::find($request->validated()['model_id']));
|
||||
}
|
||||
|
@ -642,7 +641,6 @@ class AssetsController extends Controller
|
|||
$asset->location_id = $request->validated()['rtd_location_id'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* this is here just legacy reasons. Api\AssetController
|
||||
* used image_source once to allow encoded image uploads.
|
||||
|
@ -669,7 +667,6 @@ class AssetsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if ($asset->save()) {
|
||||
if (($request->filled('assigned_user')) && ($target = User::find($request->get('assigned_user')))) {
|
||||
$location = $target->location_id;
|
||||
|
@ -689,10 +686,8 @@ class AssetsController extends Controller
|
|||
if ($asset->image) {
|
||||
$asset->image = $asset->getImageUrl();
|
||||
}
|
||||
|
||||
return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.update.success')));
|
||||
}
|
||||
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue