mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge pull request #10943 from snipe/fixes/add_status_id_to_checkout_api
Added status_id to asset checkout API
This commit is contained in:
commit
9a0219eff7
|
@ -788,6 +788,9 @@ class AssetsController extends Controller
|
|||
$error_payload['target_type'] = 'user';
|
||||
}
|
||||
|
||||
if ($request->filled('status_id')) {
|
||||
$asset->status_id = $request->get('status_id');
|
||||
}
|
||||
|
||||
|
||||
if (!isset($target)) {
|
||||
|
|
|
@ -25,6 +25,7 @@ class AssetCheckoutRequest extends Request
|
|||
"assigned_user" => 'required_without_all:assigned_asset,assigned_location',
|
||||
"assigned_asset" => 'required_without_all:assigned_user,assigned_location',
|
||||
"assigned_location" => 'required_without_all:assigned_user,assigned_asset',
|
||||
'status_id' => 'exists:status_labels,id,deployable,1',
|
||||
"checkout_to_type" => 'required|in:asset,location,user'
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue