fix : correctif mr
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
import CircleSkeleton from "~/components/skeleton/CircleSkeleton.vue"
|
||||
import TextSkeleton from "~/components/skeleton/TextSkeleton.vue"
|
||||
import {onBeforeUnmount, onMounted, ref} from "vue"
|
||||
import { useApiAuthHeader } from "~/composables/useApiAuth"
|
||||
import { apiFetch } from "~/composables/useApiAuth"
|
||||
|
||||
interface StatusRow {
|
||||
label: string
|
||||
@@ -72,7 +72,6 @@ const props = withDefaults(
|
||||
const rows = ref<StatusRow[]>([])
|
||||
const loading = ref(true)
|
||||
const initialized = ref(false)
|
||||
const apiAuthHeader = useApiAuthHeader()
|
||||
let timer: ReturnType<typeof setInterval> | null = null
|
||||
|
||||
const statusLabel = (status: number) => {
|
||||
@@ -86,9 +85,7 @@ const checkStatus = async () => {
|
||||
loading.value = true
|
||||
}
|
||||
try {
|
||||
const data = await $fetch<StatusResponse>(props.endpoint, {
|
||||
headers: apiAuthHeader
|
||||
})
|
||||
const data = await apiFetch<StatusResponse>(props.endpoint)
|
||||
rows.value = data.results
|
||||
} catch (error) {
|
||||
rows.value = [
|
||||
|
||||
Reference in New Issue
Block a user