Merge pull request #10630 from JonathonReinhart/10629-checkin-API-error-status

Fix /hardware/{id}/checkin API response on error
This commit is contained in:
snipe 2022-02-08 08:54:17 -08:00 committed by GitHub
commit ebc35c4519
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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')));
}