Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Multiple deletions

Smaug673928533573656e
diff --git a/frontend/app/pages/dashboard/cdn/_modals/DeleteRessourceModal.vue b/frontend/app/pages/dashboard/cdn/_modals/DeleteRessourceModal.vue
index 1ecd6285..14ff26f7 100644
--- a/frontend/app/pages/dashboard/cdn/_modals/DeleteRessourceModal.vue
+++ b/frontend/app/pages/dashboard/cdn/_modals/DeleteRessourceModal.vue
@@ -19,14 +19,12 @@
const props = defineProps<{ ressources: string[] }>();
const emit = defineEmits(['close']);
const deleteRessource = async () => {
- for (const ressourceId of props.ressources) {
- await useRessourcesStore()
- .delete(ressourceId)
- .then(() => {
- emit('close');
- useRouter().push('/dashboard/cdn');
- })
- .catch(e => useNotifications().add({ type: 'error', title: 'Error', message: e }));
- }
+ await useRessourcesStore()
+ .bulkDelete(props.ressources)
+ .then(() => {
+ emit('close');
+ useRouter().push('/dashboard/cdn');
+ })
+ .catch(e => useNotifications().add({ type: 'error', title: 'Error', message: e }));
};
</script>