mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Use asset model request
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
0f43b3f8f9
commit
ef56f599d2
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers\Api;
|
|||
|
||||
use App\Helpers\Helper;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\StoreAssetModelRequest;
|
||||
use App\Http\Transformers\AssetModelsTransformer;
|
||||
use App\Http\Transformers\AssetsTransformer;
|
||||
use App\Http\Transformers\SelectlistTransformer;
|
||||
|
@ -119,7 +120,7 @@ class AssetModelsController extends Controller
|
|||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(ImageUploadRequest $request)
|
||||
public function store(StoreAssetModelRequest $request)
|
||||
{
|
||||
$this->authorize('create', AssetModel::class);
|
||||
$assetmodel = new AssetModel;
|
||||
|
@ -176,7 +177,7 @@ class AssetModelsController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(ImageUploadRequest $request, $id)
|
||||
public function update(StoreAssetModelRequest $request, $id)
|
||||
{
|
||||
$this->authorize('update', AssetModel::class);
|
||||
$assetmodel = AssetModel::findOrFail($id);
|
||||
|
|
|
@ -64,7 +64,7 @@ class AssetModelsController extends Controller
|
|||
* @since [v1.0]
|
||||
* @param ImageUploadRequest $request
|
||||
*/
|
||||
public function store(ImageUploadRequest $request) : RedirectResponse
|
||||
public function store(StoreAssetModelRequest $request) : RedirectResponse
|
||||
{
|
||||
$this->authorize('create', AssetModel::class);
|
||||
$model = new AssetModel;
|
||||
|
|
Loading…
Reference in a new issue