updated ui and file creation
This commit is contained in:
@@ -327,7 +327,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||
delBtn?.addEventListener('click', async () => {
|
||||
if (confirm(`Delete post "${slugInput.value}" permanently?`)) {
|
||||
try {
|
||||
const res = await fetch(`/api/posts/${slugInput.value}`, {
|
||||
const res = await fetch(`/api/posts/${encodeURIComponent(slugInput.value)}`, {
|
||||
method: 'DELETE',
|
||||
headers: { 'Authorization': `Bearer ${token}` }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user