admin(ui): actually get avatar for users

This commit is contained in:
Matthew Penner 2021-01-07 09:55:04 -07:00
parent 56c098a316
commit 9eed88b430
3 changed files with 8 additions and 4 deletions

View file

@ -13,7 +13,8 @@ export interface User {
language: string;
rootAdmin: boolean;
tfa: boolean;
roleName: string;
avatarURL: string;
roleName: string | null;
createdAt: Date;
updatedAt: Date;
}
@ -29,6 +30,7 @@ export const rawDataToUser = ({ attributes }: FractalResponseData): User => ({
language: attributes.language,
rootAdmin: attributes.root_admin,
tfa: attributes['2fa'],
avatarURL: attributes.avatar_url,
roleName: attributes.role_name,
createdAt: new Date(attributes.created_at),
updatedAt: new Date(attributes.updated_at),