Create a per-user admin page to inspect users
Add page to allow admins to inspect all of the details stored on the server of a user account. For now this is just the UserDetails, but in the future this is planned to be expanded to also show sessions and logs.
This commit is contained in:
parent
52973ffa9a
commit
d006be251c
7 changed files with 176 additions and 26 deletions
|
@ -62,6 +62,17 @@ export const useUsersStore = defineStore("users", () => {
|
|||
state.fetched.value = false;
|
||||
await actions.fetch();
|
||||
},
|
||||
async saveUser(user: ClientUser) {
|
||||
try {
|
||||
await $fetch("/api/admin/user", {
|
||||
method: "PATCH",
|
||||
body: user.toApi(),
|
||||
});
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
alert(err?.data?.message ?? err.message);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
appEventSource?.addEventListener("update", (event) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue