mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 02:38:50 +02:00
Added some basic DB fields for the new project system
This commit is contained in:
parent
8ae4e9fe05
commit
0c7ec9f0c7
36 changed files with 281 additions and 130 deletions
|
@ -22,7 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Entity\Devices\Device;
|
||||
use App\Entity\ProjectSystem\Project;
|
||||
use App\Entity\Parts\Category;
|
||||
use App\Entity\Parts\Footprint;
|
||||
use App\Entity\Parts\Manufacturer;
|
||||
|
@ -136,10 +136,10 @@ class TreeController extends AbstractController
|
|||
* @Route("/device/{id}", name="tree_device")
|
||||
* @Route("/devices", name="tree_device_root")
|
||||
*/
|
||||
public function deviceTree(?Device $device = null): JsonResponse
|
||||
public function deviceTree(?Project $device = null): JsonResponse
|
||||
{
|
||||
if ($this->isGranted('@devices.read')) {
|
||||
$tree = $this->treeGenerator->getTreeView(Device::class, $device, 'devices');
|
||||
$tree = $this->treeGenerator->getTreeView(Project::class, $device, 'devices');
|
||||
} else {
|
||||
return new JsonResponse("Access denied", 403);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue