mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Give a better response to listing no files on an asset
HTTP500 was never a good choice. Now it sends back an empty array
This commit is contained in:
parent
b9d56a8ecc
commit
45329912e6
|
@ -110,8 +110,8 @@ class AssetFilesController extends Controller
|
|||
return response()->json(Helper::formatStandardApiResponse('success', $files, trans('admin/hardware/message.upload.success')));
|
||||
}
|
||||
|
||||
// There are no files. This possibly isn't the best response for this, but it does get the point across
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.download.no_match', ['id' => $fileId])), 500);
|
||||
// There are no files.
|
||||
return response()->json(Helper::formatStandardApiResponse('success', array(), trans('admin/hardware/message.upload.success')));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue