refactoring: magic strings in Vorgang-View

This commit is contained in:
2025-09-26 12:34:15 +02:00
parent f43497d69c
commit f737e4da4c

View File

@@ -2,7 +2,7 @@
import Trash from '$lib/icons/Trash.svelte'; import Trash from '$lib/icons/Trash.svelte';
import Folder from '$lib/icons/Folder.svelte'; import Folder from '$lib/icons/Folder.svelte';
import EmptyList from '$lib/components/EmptyList.svelte'; import EmptyList from '$lib/components/EmptyList.svelte';
import { ROUTE_NAMES } from '../../index.js'; import { API_ROUTES, ROUTE_NAMES } from '../../index.js';
let { data } = $props(); let { data } = $props();
@@ -18,7 +18,7 @@
if (!target) return; if (!target) return;
let filename = target.id.split('del__')[1]; let filename = target.id.split('del__')[1];
let url = `/api/list/${filename}`; let url = API_ROUTES.VORGANG(filename);
try { try {
const response = await fetch(url, { method: 'DELETE' }); const response = await fetch(url, { method: 'DELETE' });