Aggiustamenti Proxy, Impl di list.

This commit is contained in:
2025-03-24 15:26:28 +01:00
parent 0c48df239e
commit 9cb2a13169
9 changed files with 138 additions and 25 deletions

32
pages/user/list.vue Normal file
View File

@@ -0,0 +1,32 @@
<script setup lang="ts">
const { data, status, error } = useFetch('/api/internal/current/users/?limit=100&is_readonly=0', {
method: 'GET',
headers: {
'Accept': 'application/json',
}
});
</script>
<template>
<div>
<!-- Causa useFetch va basically sempre in SSR gli stati diversi da success e error non appaiono mai. -->
<div v-if="status === 'pending'">
<p>LOADING...</p>
</div>
<div v-else-if="status === 'error'">
<p>ERROR: {{ error }}</p>
</div>
<div v-else-if="status ==='success'">
<p>DATA:</p>
<p>{{ data }}</p>
</div>
<div v-else-if="status === 'idle'">
<p>IDLE???</p>
</div>
</div>
</template>
<style scoped>
</style>