refactoring: magic strings in Vorgang-View
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import Trash from '$lib/icons/Trash.svelte';
|
||||
import Folder from '$lib/icons/Folder.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();
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if (!target) return;
|
||||
let filename = target.id.split('del__')[1];
|
||||
|
||||
let url = `/api/list/${filename}`;
|
||||
let url = API_ROUTES.VORGANG(filename);
|
||||
|
||||
try {
|
||||
const response = await fetch(url, { method: 'DELETE' });
|
||||
|
||||
Reference in New Issue
Block a user