mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Fixed inspection issues.
This commit is contained in:
parent
16497b76c5
commit
96d7e4c9f4
45 changed files with 448 additions and 89 deletions
|
@ -46,9 +46,11 @@ class AttachmentFileController extends AbstractController
|
|||
*
|
||||
* @Route("/attachment/{id}/download", name="attachment_download")
|
||||
*
|
||||
* @param Attachment $attachment
|
||||
* @param AttachmentManager $helper
|
||||
* @return BinaryFileResponse
|
||||
*/
|
||||
public function download(Attachment $attachment, AttachmentManager $helper)
|
||||
public function download(Attachment $attachment, AttachmentManager $helper): BinaryFileResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('read', $attachment);
|
||||
|
||||
|
@ -74,11 +76,12 @@ class AttachmentFileController extends AbstractController
|
|||
*
|
||||
* @Route("/attachment/{id}/view", name="attachment_view")
|
||||
*
|
||||
* @param Attachment $attachment
|
||||
* @param AttachmentManager $helper
|
||||
* @return BinaryFileResponse
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function view(Attachment $attachment, AttachmentManager $helper)
|
||||
public function view(Attachment $attachment, AttachmentManager $helper): BinaryFileResponse
|
||||
{
|
||||
$this->denyAccessUnlessGranted('read', $attachment);
|
||||
|
||||
|
@ -102,6 +105,8 @@ class AttachmentFileController extends AbstractController
|
|||
/**
|
||||
* @Route("/attachment/list", name="attachment_list")
|
||||
*
|
||||
* @param DataTableFactory $dataTable
|
||||
* @param Request $request
|
||||
* @return JsonResponse|Response
|
||||
*/
|
||||
public function attachmentsTable(DataTableFactory $dataTable, Request $request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue