refactoring branch, tatort page-svelte, Datenaktualisierung durch api, page.ts, choose better names

This commit is contained in:
2025-08-12 17:36:24 +02:00
parent 35a55d0676
commit 7bdfa1f69b
9 changed files with 116 additions and 360 deletions

View File

@@ -1,5 +1,5 @@
import { BUCKET, client } from '$lib/minio';
import { json, type RequestHandler } from '@sveltejs/kit';
import { json } from '@sveltejs/kit';
import { getVorgangByName } from '$lib/server/vorgangService';
export async function GET() {
@@ -36,12 +36,13 @@ export async function DELETE({ request }: { request: Request }) {
}
// rename operation for crimes
export async function PUT({ params, request }: { params: RequestHandler; request: Request }) {
export async function PUT({ params, request }) {
const data = await request.json();
// Vorgang
const vorgangName = params.vorgang;
const vorgangToken = getVorgangByName(vorgangName)?.token;
const vorgangToken = params.vorgang;
//const vorgangToken = getVorgangByName(vorgangName)?.token;
// prepare copy, incl. check if new name exists already
const crimeOldName = data['oldName'];