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
|
@ -35,17 +35,7 @@ export const apiUserTypeSchema = z.union([
|
|||
])
|
||||
export type ApiUserType = z.infer<typeof apiUserTypeSchema>;
|
||||
|
||||
export interface ApiAccount {
|
||||
id: Id,
|
||||
updatedAt: string,
|
||||
type: ApiUserType,
|
||||
/** Name of the account. Not present on anonymous accounts */
|
||||
name?: string,
|
||||
interestedEventIds?: number[],
|
||||
interestedEventSlotIds?: number[],
|
||||
timezone?: string,
|
||||
locale?: string,
|
||||
}
|
||||
export type ApiAccount = ApiUser & ApiUserDetails
|
||||
|
||||
export const apiAccountPatchSchema = z.object({
|
||||
name: z.optional(z.string()),
|
||||
|
@ -151,6 +141,16 @@ export const apiUserPatchSchema = z.object({
|
|||
});
|
||||
export type ApiUserPatch = z.infer<typeof apiUserPatchSchema>;
|
||||
|
||||
export interface ApiUserDetails {
|
||||
id: Id,
|
||||
updatedAt: string,
|
||||
deleted?: false,
|
||||
interestedEventIds?: number[],
|
||||
interestedEventSlotIds?: number[],
|
||||
timezone?: string,
|
||||
locale?: string,
|
||||
}
|
||||
|
||||
export interface ApiAccountUpdate {
|
||||
type: "account-update",
|
||||
data: ApiAccount,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue