now able to get all users and print them

This commit is contained in:
Jona Kläß
2024-05-02 16:05:24 +02:00
parent 64edf9b81c
commit 74d9c2a62e
2 changed files with 32 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ export const useUserStore = defineStore('userStore', {
userLoaded: false,
keycloak: null as Keycloak | null,
keycloakId: "",
users: [] as ptpUser[],
}),
getters: {},
actions: {
@@ -21,6 +22,9 @@ export const useUserStore = defineStore('userStore', {
async loadPtpUsersByKeycloakID(keycloakID : string) : Promise<responseModel> {
return (await api.get("/users/login/"+keycloakID)).data;
},
async loadAllUsers(){
this.users = (await api.get("/users/user")).data;
},
async initKeycloak() {
/**
* Variablen sind in quasar.config.js definiert und werden hier verwendet.