Update AssetsController.php

Fix:When using API CheckIn assets, there will be two CheckIn records in the Activity Report log for each asset.
This commit is contained in:
Shanks 2021-08-24 16:39:58 +08:00 committed by GitHub
parent 9285697611
commit 961e80404a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -798,7 +798,6 @@ class AssetsController extends Controller
}
if ($asset->save()) {
$asset->logCheckin($target, e($request->input('note')));
event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note')));
return response()->json(Helper::formatStandardApiResponse('success', ['asset'=> e($asset->asset_tag)], trans('admin/hardware/message.checkin.success')));