Ability to delete links from database

This commit is contained in:
SinTan1729 committed 2023-04-03 17:58:19 -05:00
1 parent 98d10cfd5b
commit e4ff2df3f1
3 files changed
+16 -2

No files matched your search

+1 -1
View File
@@ -108,7 +108,7 @@ const deleteButton = (shortUrl) => {
e.preventDefault();
if (confirm("Do you want to delete the entry " + shortUrl + "?")) {
document.getElementById("alertBox")?.remove();
fetch(`/api/${shortUrl}`, {
fetch(`/api/del/${shortUrl}`, {
method: "DELETE"
}).then(_ => refreshData());
}