fix admin texts route shadow conflict

FastRoute rejected /api/texts/all because the previously
declared variable route /api/texts/{textId} would shadow it,
crashing the app on boot. move the admin all-texts endpoint
to /api/admin/texts to clear the conflict; admin texts.js
follows the new URL.
This commit is contained in:
Yisroel Baum 2026-05-02 21:54:43 +03:00
parent 71e5fb8fda
commit c065e065e9
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ $app->group('', function (RouteCollectorProxy $group) {
[ViewController::class, 'text']
);
$group->get('/api/texts/all', [TextController::class, 'getAllTexts']);
$group->get('/api/admin/texts', [TextController::class, 'getAllTexts']);
})->add(AdminMiddleware::class)->add(AuthMiddleware::class);
return $app;