feat: delete confirm

close #1
pull/8/head
sigoden 2022-05-31 08:01:03 +08:00
parent fb03f7ddb8
commit be3ae2fe00
1 changed files with 2 additions and 0 deletions

View File

@ -125,6 +125,8 @@ async function deletePath(index) {
const file = DATA.paths[index];
if (!file) return;
if (!confirm(`Delete \`${file.name}\`?`)) return;
try {
const res = await fetch(getUrl(file.name), {
method: "DELETE",