News: Cache-Buster für Bild-URLs, HEAD, Limiter-Feinschliff
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
319f8937aa
commit
a421308019
5 files changed
+57
-12
No files matched your search
@@ -191,7 +191,9 @@ export async function publicPage(projectId, page, now = new Date()) {
|
||||
const slice = hanging.slice((n - 1) * PAGE_SIZE, n * PAGE_SIZE)
|
||||
const posts = []
|
||||
for (const p of slice) {
|
||||
const image = p.imageId ? await readNewsImageMeta(projectId, p.imageId) : null
|
||||
const meta = p.imageId ? await readNewsImageMeta(projectId, p.imageId) : null
|
||||
// v (Zeitstempel der letzten Aenderung) dient der Route als Cache-Buster fuer die Bild-URL
|
||||
const image = meta ? { ...meta, v: Date.parse(p.updatedAt || p.visibleFrom) } : null
|
||||
posts.push({ id: p.$id, type: p.type, title: p.title, text: p.text, paper: p.paper, date: berlinDay(p.visibleFrom), image })
|
||||
}
|
||||
return { posts, hasMore: hanging.length > n * PAGE_SIZE }
|
||||
|
||||
Reference in new issue
Block a user