REST Service for POPCORN - ILIAS
alex
2025-06-04 e7a1743dc7a3660115aeb67714c37d2c2e7581e1
vue/src/pages/UserDetail.vue
@@ -2,7 +2,7 @@
import {useRoute} from 'vue-router'
import {onMounted, reactive, ref} from "vue"
import {iliasBase} from "../lib/api"
import {getUser, iliasBase} from "../lib/api"
import LinkExtern from "../components/LinkExtern.vue"
const route = useRoute()
@@ -15,15 +15,9 @@
/////////////////////////////////////////////////////////////////////////
async function init () {
   const res = await fetch(`/api/user/userid/${userId}?token=jiuGfr432898D90290kjfsldkfn3hh8F`)
   const data = await res.json()
   const data = await getUser(userId)
   console.log(data)
   if (res.status === 200) {
      user.value = data
   }
   else {
      error.value = `ERROR: ${res.status}`
   }
}
</script>
@@ -31,7 +25,7 @@
<template>
   <div>
      <h1>
      <h1>asdf
         User {{ userId }}
         <small class="ml-05">{{ user?.firstname }} {{ user?.lastname }}</small>
      </h1>