-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more cleanup to fit formatting convention
- Loading branch information
1 parent
87ef37b
commit 08cb8c3
Showing
3 changed files
with
12 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -856,16 +856,13 @@ public function checkin(Request $request, $asset_id) | |
} | ||
|
||
/** | ||
* Bulk Checkin an asset | ||
* This is the current solution to perform a bulk api checkin based on an asset tag, rather than a regular checkin. | ||
* This is due to the need to find the asset first based on the asset tag. | ||
* Checkin an asset by asset tag | ||
* | ||
* @author [A. Janes] [<[email protected]>] | ||
* @param int $assetId | ||
* @since [v4.0] | ||
* @since [v6.0] | ||
* @return JsonResponse | ||
*/ | ||
public function bulkCheckin(Request $request) | ||
public function checkinByTag(Request $request) | ||
{ | ||
$this->authorize('checkin', Asset::class); | ||
$asset = Asset::with('assetstatus')->where('asset_tag', $request->input('asset_tag'))->first(); | ||
|
@@ -875,8 +872,8 @@ public function bulkCheckin(Request $request) | |
} | ||
|
||
return response()->json(Helper::formatStandardApiResponse('error', [ | ||
'asset'=> e($request->input('asset_tag')) | ||
], 'Asset with tag '.e($request->input('asset_tag')).' not found')); | ||
'asset'=> e($request->input('asset')) | ||
], 'Asset with tag '.e($request->input('asset')).' not found')); | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters