Fixed #6633 - return 200 status code on asset API

This commit is contained in:
snipe 2019-02-04 18:59:49 -08:00
parent 9d21fc85bc
commit 4fe63d2966

View file

@ -292,7 +292,7 @@ class AssetsController extends Controller
$this->authorize('view', $asset);
return (new AssetsTransformer)->transformAsset($asset);
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 404);
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200);
}
@ -311,7 +311,7 @@ class AssetsController extends Controller
$this->authorize('view', $assets);
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 404);
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200);
}