Fixed qr code scan URL paths

This commit is contained in:
Jan Böhmer 2023-07-02 14:03:29 +02:00
parent ae8edffdc8
commit 4f82a0f026
3 changed files with 6 additions and 3 deletions

View file

@ -2,7 +2,7 @@
scan_qr:
path: /scan/{type}/{id}
controller: App\Controller\ScanController:scanQRCode
controller: App\Controller\ScanController::scanQRCode
csp_report:
path: /csp/report

View file

@ -58,7 +58,7 @@ class ScanController extends AbstractController
{
}
#[Route(path: '', name: 'scan_dialog')]
#[Route(path: '/', name: 'scan_dialog')]
public function dialog(Request $request): Response
{
$this->denyAccessUnlessGranted('@tools.label_scanner');

View file

@ -117,12 +117,15 @@ class ApplicationAvailabilityFunctionalTest extends WebTestCase
yield ['/select_api/measurement_unit'];
//Label test
yield ['/scan'];
yield ['/label/dialog'];
yield ['/label/dialog?target_id=1&target_type=part'];
yield ['/label/1/dialog'];
yield ['/label/1/dialog?target_id=1&target_type=part&generate=1'];
//Scan test
yield ['/scan']; //Interactive scan dialog
yield ['/scan/part/1']; //Scan a part
//Tools
yield ['/tools/reel_calc'];
yield ['/tools/server_infos'];