feat(shopping): GET /api/shopping-list + DELETE (Liste leeren)
Some checks failed
Build & Publish Docker Image / build-and-push (push) Has been cancelled

This commit is contained in:
hsiegeln
2026-04-21 23:18:24 +02:00
parent 76864a6034
commit 8570d41f53

View File

@@ -0,0 +1,13 @@
import type { RequestHandler } from './$types';
import { json } from '@sveltejs/kit';
import { getDb } from '$lib/server/db';
import { clearCart, listShoppingList } from '$lib/server/shopping/repository';
export const GET: RequestHandler = async () => {
return json(listShoppingList(getDb()));
};
export const DELETE: RequestHandler = async () => {
clearCart(getDb());
return json({ ok: true });
};