Fix: Chapter-Namen in Admin immer frisch vom Server laden
cache: no-store verhindert dass veraltete Chapter-Namen angezeigt werden. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -470,7 +470,7 @@ async function openImportFromChapter() {
|
|||||||
for (const ch of chapters) {
|
for (const ch of chapters) {
|
||||||
if (activeChapter && ch.name === activeChapter.code) continue;
|
if (activeChapter && ch.name === activeChapter.code) continue;
|
||||||
try {
|
try {
|
||||||
const cfgRes = await fetch(giteaUrl(`chapters/${ch.name}/config.json`));
|
const cfgRes = await fetch(giteaUrl(`chapters/${ch.name}/config.json`), { cache: 'no-store' });
|
||||||
const cfg = cfgRes.ok ? await cfgRes.json() : {};
|
const cfg = cfgRes.ok ? await cfgRes.json() : {};
|
||||||
const btn = document.createElement('div');
|
const btn = document.createElement('div');
|
||||||
btn.className = 'chapter-item';
|
btn.className = 'chapter-item';
|
||||||
@@ -739,7 +739,7 @@ async function loadAllChapters() {
|
|||||||
container.innerHTML = '';
|
container.innerHTML = '';
|
||||||
for (const ch of chapters) {
|
for (const ch of chapters) {
|
||||||
try {
|
try {
|
||||||
const cfgRes = await fetch(giteaUrl(`chapters/${ch.name}/config.json`));
|
const cfgRes = await fetch(giteaUrl(`chapters/${ch.name}/config.json`), { cache: 'no-store' });
|
||||||
const cfg = cfgRes.ok ? await cfgRes.json() : {};
|
const cfg = cfgRes.ok ? await cfgRes.json() : {};
|
||||||
const membersRes = await fetch(giteaUrl(`chapters/${ch.name}/members.json`));
|
const membersRes = await fetch(giteaUrl(`chapters/${ch.name}/members.json`));
|
||||||
const membersData = membersRes.ok ? await membersRes.json() : {};
|
const membersData = membersRes.ok ? await membersRes.json() : {};
|
||||||
|
|||||||
Reference in New Issue
Block a user