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
|
|
@ -3,7 +3,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
const form = document.getElementById('texts-form');
|
||||
|
||||
async function loadTexts() {
|
||||
const res = await fetch('/api/texts/all', {
|
||||
const res = await fetch('/api/admin/texts', {
|
||||
credentials: 'same-origin',
|
||||
});
|
||||
const texts = await res.json();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue