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: scan_qr:
path: /scan/{type}/{id} path: /scan/{type}/{id}
controller: App\Controller\ScanController:scanQRCode controller: App\Controller\ScanController::scanQRCode
csp_report: csp_report:
path: /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 public function dialog(Request $request): Response
{ {
$this->denyAccessUnlessGranted('@tools.label_scanner'); $this->denyAccessUnlessGranted('@tools.label_scanner');

View file

@ -117,12 +117,15 @@ class ApplicationAvailabilityFunctionalTest extends WebTestCase
yield ['/select_api/measurement_unit']; yield ['/select_api/measurement_unit'];
//Label test //Label test
yield ['/scan'];
yield ['/label/dialog']; yield ['/label/dialog'];
yield ['/label/dialog?target_id=1&target_type=part']; yield ['/label/dialog?target_id=1&target_type=part'];
yield ['/label/1/dialog']; yield ['/label/1/dialog'];
yield ['/label/1/dialog?target_id=1&target_type=part&generate=1']; 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 //Tools
yield ['/tools/reel_calc']; yield ['/tools/reel_calc'];
yield ['/tools/server_infos']; yield ['/tools/server_infos'];