Skip to content

Commit

Permalink
removed unnecessary additional data call from api method
Browse files Browse the repository at this point in the history
  • Loading branch information
adagioajanes committed Dec 20, 2021
1 parent 14b21a6 commit 2b5aca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ public function checkin(Request $request, $asset_id)
public function checkinByTag(Request $request)
{
$this->authorize('checkin', Asset::class);
$asset = Asset::with('assetstatus')->where('asset_tag', $request->input('asset_tag'))->first();
$asset = Asset::where('asset_tag', $request->input('asset_tag'))->first();

if($asset) {
return $this->checkin($request, $asset->id);
Expand Down

0 comments on commit 2b5aca1

Please sign in to comment.