added userDtos
All checks were successful
Build and Deploy Frontend / build-and-deploy (push) Successful in 7s
Build and Deploy API / build-and-deploy (push) Successful in 10s

This commit is contained in:
2026-03-28 00:01:45 -05:00
parent 5afd9057f2
commit f271ff59f8
11 changed files with 97 additions and 71 deletions

View File

@@ -0,0 +1,37 @@
<script setup lang="ts">
import { onMounted } from "vue"
import { useRoute, useRouter } from "vue-router";
import { useUsersStore } from "../stores/UsersStore.ts"
import * as authApi from "../api/AuthApi";
const store = useUsersStore()
const router = useRouter();
onMounted(() => {
store.fetchUsers()
})
function logout() {
authApi.logout();
router.push("/login");
}
</script>
<template>
<div>
<h1>Users</h1>
<table>
<tr v-for="user in store.users" :key="user.id">
<td>{{ user.username }}</td>
<td>
<button @click="store.removeUser(user.id)">Delete</button>
</td>
</tr>
</table>
<button @click="logout()">Logout</button>
</div>
</template>