REST Service for POPCORN - ILIAS
alex
2025-06-03 5aa551b34d06ad185ab000d4d5314849e2248992
vue/src/pages/Users.vue
@@ -11,6 +11,7 @@
   limit: 10,
   data: [],
})
const limit = 24
const error = ref(null)
onMounted(init)
@@ -18,7 +19,7 @@
/////////////////////////////////////////////////////////////////////////
async function init () {
   const res = await fetch(`/api/users?token=jiuGfr432898D90290kjfsldkfn3hh8F`)
   const res = await fetch(`/api/users?limit=${limit}&token=jiuGfr432898D90290kjfsldkfn3hh8F`)
   const data = await res.json()
   console.log(data)
   if (res.status === 200) {
@@ -35,11 +36,19 @@
   <div>
      <h1>Users</h1>
      <h1>
         Users
         <small>
            {{users.offset}} - {{users.offset+users.limit}} von {{users.total}}
         </small>
      </h1>
      <p>{{ userId }}</p>
      <p v-if="error">{{ error }}</p>
      <div class="users">
      <div class="user">
         <table class="">
            <thead>
               <tr>
@@ -55,7 +64,11 @@
            </thead>
            <tbody>
               <tr v-for="user in users.data">
                  <td>{{user.usr_id}}</td>
                  <td>
                     <RouterLink :to="`/ui/user/${user.usr_id}`">
                        {{user.usr_id}}
                     </RouterLink>
                  </td>
                  <td>{{user.login}}</td>
                  <td>{{user.firstname}}</td>
                  <td>{{user.lastname}}</td>