ui: fix security keys render error
This commit is contained in:
parent
e384c0d5c3
commit
42bfaf9a19
|
@ -4,14 +4,14 @@ export interface WebauthnKey {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
lastUsedAt: Date;
|
lastUsedAt: Date | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const rawDataToWebauthnKey = (data: any): WebauthnKey => ({
|
export const rawDataToWebauthnKey = (data: any): WebauthnKey => ({
|
||||||
id: data.id,
|
id: data.id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
createdAt: new Date(data.created_at),
|
createdAt: new Date(data.created_at),
|
||||||
lastUsedAt: new Date(data.last_used_at) || new Date(),
|
lastUsedAt: data.last_used_at ? new Date(data.last_used_at) : undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default (): Promise<WebauthnKey[]> => {
|
export default (): Promise<WebauthnKey[]> => {
|
||||||
|
|
Loading…
Reference in New Issue