Fix /hardware/{id}/checkin API response on error

Fixes #10629
This commit is contained in:
Jonathon Reinhart 2022-02-08 00:55:31 -05:00
parent 1a31231569
commit cd963179fd

View file

@ -866,7 +866,7 @@ class AssetsController extends Controller
return response()->json(Helper::formatStandardApiResponse('success', ['asset'=> e($asset->asset_tag)], trans('admin/hardware/message.checkin.success')));
}
return response()->json(Helper::formatStandardApiResponse('success', ['asset'=> e($asset->asset_tag)], trans('admin/hardware/message.checkin.error')));
return response()->json(Helper::formatStandardApiResponse('error', ['asset'=> e($asset->asset_tag)], trans('admin/hardware/message.checkin.error')));
}