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:
parent
71e5fb8fda
commit
c065e065e9
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue