preliminary frontend for ther auth api
Some checks failed
Build and Deploy Frontend / build-and-deploy (push) Failing after 4s
Build and Deploy API / build-and-deploy (push) Successful in 12s

This commit is contained in:
2026-03-17 22:30:59 -05:00
parent c19cd0c718
commit 661bb03d1d
7 changed files with 54 additions and 21 deletions

View File

@@ -2,14 +2,22 @@
<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>
@@ -31,5 +39,6 @@ onMounted(() => {
</td>
</tr>
</table>
<button @click="logout()">Logout</button>
</div>
</template>