mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-18 05:09:36 +00:00
parent
f15979ed11
commit
af6ddffa1d
1 changed files with 4 additions and 1 deletions
|
|
@ -71,7 +71,10 @@ class TypeaheadController extends AbstractController
|
||||||
#[Route(path: '/builtInResources/search', name: 'typeahead_builtInRessources')]
|
#[Route(path: '/builtInResources/search', name: 'typeahead_builtInRessources')]
|
||||||
public function builtInResources(Request $request, BuiltinAttachmentsFinder $finder): JsonResponse
|
public function builtInResources(Request $request, BuiltinAttachmentsFinder $finder): JsonResponse
|
||||||
{
|
{
|
||||||
$query = $request->get('query');
|
//Ensure that the user can access Part-DB at all
|
||||||
|
$this->denyAccessUnlessGranted('HAS_ACCESS_PERMISSIONS');
|
||||||
|
|
||||||
|
$query = $request->query->getString('query');
|
||||||
$array = $finder->find($query);
|
$array = $finder->find($query);
|
||||||
|
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue