f090_magic_strings_refactoring #35
@@ -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' });
|
||||||
|
|||||||
Reference in New Issue
Block a user