Dienstellen Selektion raus aus Admin

This commit is contained in:
titver968
2025-04-17 14:17:12 +02:00
parent cc94a6dda2
commit 06693cf59a
3 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
import { PrismaClient } from '@prisma/client';
import { json } from '@sveltejs/kit';
import type { RequestHandler } from './$types';
const prisma = new PrismaClient();
export const GET: RequestHandler = async () => {
const dienststellen = await prisma.dienststelle.findMany({ orderBy: { name: 'asc' } });
return json(dienststellen);
};