Merge branch 'develop' into feat/add-module-lint

# Conflicts:
#	components/BackupRun.vue
#	composables/useApiAuth.ts
#	pages/index.vue
#	server/api/disk.get.ts
This commit is contained in:
2026-03-13 10:03:18 +01:00
18 changed files with 276 additions and 108 deletions

View File

@@ -79,6 +79,7 @@
<script setup lang="ts">
import { computed, onMounted, ref } from "vue"
import { Icon as IconifyIcon } from "@iconify/vue"
import { apiFetch } from "~/composables/useApiAuth"
import { useApiAuthHeader } from "~/composables/useApiAuth"
type BackupScript = {
@@ -136,9 +137,7 @@ const loadScripts = async () => {
downloadFolders: []
})
try {
const data = await $fetch<BackupScriptListResponse>("/api/backup-script", {
headers: apiAuthHeader
})
const data = await apiFetch<BackupScriptListResponse>("/api/backup-script")
scripts.value = data.scripts
} catch {
scripts.value = []
@@ -164,10 +163,9 @@ const runScript = async (key: string) => {
isError.value = false
try {
const data = await $fetch<BackupScriptRunResponse>("/api/backup-script", {
const data = await apiFetch<BackupScriptRunResponse>("/api/backup-script", {
method: "POST",
body: { key },
headers: apiAuthHeader
body: { key }
})
message.value = `${data.label} execute avec succes`
output.value = data.output || "Aucune sortie retournee."