feat: functional folders (filter/delete/gallery) + always show model + variant switcher

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6
This commit is contained in:
2026-07-23 19:39:05 +00:00
parent e59d26fadd
commit 78737936fb
2 changed files with 129 additions and 39 deletions
+10
View File
@@ -20,3 +20,13 @@ export const POST: APIRoute = async ({ request, locals }) => {
[b.name.trim(), b.picdrop_gallery || null]);
return json({ folder: row });
};
// Ordner löschen (Bilder bleiben, verlieren nur die Zuordnung). ?id=…
export const DELETE: APIRoute = async ({ request, url, locals }) => {
if (!locals.user) return new Response('Unauthorized', { status: 401 });
let id = url.searchParams.get('id');
if (!id) { try { id = (await request.json())?.id; } catch { /* egal */ } }
if (!id) return json({ error: 'Keine ID.' }, 400);
await query('DELETE FROM folders WHERE id=$1', [id]);
return json({ ok: true });
};