chore: move image stuff to axum-image

This commit is contained in:
trisua 2025-08-24 12:08:13 -04:00
parent dbed2b2457
commit e8cc541f45
15 changed files with 48 additions and 244 deletions

View file

@ -676,7 +676,7 @@
(text "{{ text \"general:action.view\" }}")))
(button
("class" "raised small red")
("onclick" "remove_upload('{{ upload.id }}')")
("onclick" "remove_upload('{{ upload.bucket }}', '{{ upload.id }}')")
(text "{{ icon \"x\" }}")
(span
(text "{{ text \"stacks:label.remove\" }}")))))
@ -701,7 +701,7 @@
(str (text "general:action.save"))))))
(text "{% endfor %} {{ components::pagination(page=page, items=uploads|length, key=\"#/account/uploads\") }}")
(script
(text "globalThis.remove_upload = async (id) => {
(text "globalThis.remove_upload = async (bucket, id) => {
if (
!(await trigger(\"atto::confirm\", [
\"Are you sure you would like to do this? This action is permanent.\",
@ -710,7 +710,7 @@
return;
}
fetch(`/api/v1/uploads/${id}`, {
fetch(`/api/v1/uploads/${bucket}/${id}`, {
method: \"DELETE\",
})
.then((res) => res.json())