feat: hlasenie pod polom s URL obrazka (zmensene / v poriadku / za prihlasenim)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub_HostacnyandClaude Opus 5.5 committed 2026-10-21 13:48:37 +02:00
1 parent 6100a7af57
commit 48fd82a77d
3 files changed
+48 -13

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ export async function GET(request: Request) {
const res = await fetch(target, { redirect: 'follow' });
const contentType = res.headers.get('content-type') || '';
if (!res.ok || !contentType.startsWith('image/')) {
return Response.json({ error: `Obrázok sa nepodarilo načítať (${res.status}).` }, { status: 502 });
return Response.json({ error: `Obrázok sa nepodarilo načítať (${res.status}).`, upstreamStatus: res.status }, { status: 502 });
}
const body = await res.arrayBuffer();
if (body.byteLength > MAX_BYTES) {