From 6fbc0c29f971e22eb80958c19f5b46276ea47bb0 Mon Sep 17 00:00:00 2001 From: SmithThe4th Date: Mon, 25 Sep 2023 19:52:22 -0400 Subject: [PATCH] [PM-4045] Get error returned when editing an item with a passkey in the CLI (#6379) * Creationdate doesn't get converted to a date * Creationdate doesn't get converted to a date * removed null assignment --- libs/common/src/models/export/fido2key.export.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/common/src/models/export/fido2key.export.ts b/libs/common/src/models/export/fido2key.export.ts index ba25ac80b5b..69df345cbe0 100644 --- a/libs/common/src/models/export/fido2key.export.ts +++ b/libs/common/src/models/export/fido2key.export.ts @@ -33,7 +33,7 @@ export class Fido2KeyExport { view.rpName = req.rpName; view.userDisplayName = req.userDisplayName; view.discoverable = req.discoverable === "true"; - view.creationDate = req.creationDate; + view.creationDate = new Date(req.creationDate); return view; } @@ -65,7 +65,7 @@ export class Fido2KeyExport { rpName: string; userDisplayName: string; discoverable: string; - creationDate: Date = null; + creationDate: Date; constructor(o?: Fido2KeyView | Fido2KeyDomain) { if (o == null) { @@ -84,7 +84,6 @@ export class Fido2KeyExport { this.rpName = o.rpName; this.userDisplayName = o.userDisplayName; this.discoverable = String(o.discoverable); - this.creationDate = o.creationDate; } else { this.credentialId = o.credentialId?.encryptedString; this.keyType = o.keyType?.encryptedString; @@ -97,7 +96,7 @@ export class Fido2KeyExport { this.rpName = o.rpName?.encryptedString; this.userDisplayName = o.userDisplayName?.encryptedString; this.discoverable = o.discoverable?.encryptedString; - this.creationDate = o.creationDate; } + this.creationDate = o.creationDate; } }