浏览代码

fix(domain-core): notification paylod to string casting

Karol Sójko 1 年之前
父节点
当前提交
a02a28774b
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      packages/domain-core/src/Domain/Notification/NotificationPayload.ts

+ 4 - 4
packages/domain-core/src/Domain/Notification/NotificationPayload.ts

@@ -15,10 +15,10 @@ export class NotificationPayload extends ValueObject<NotificationPayloadProps> {
     return JSON.stringify({
       version: this.props.version,
       type: this.props.type.value,
-      primaryIdentifier: this.props.primaryIdentifier,
-      primaryIndentifierType: this.props.primaryIndentifierType,
-      secondaryIdentifier: this.props.secondaryIdentifier,
-      secondaryIdentifierType: this.props.secondaryIdentifierType,
+      primaryIdentifier: this.props.primaryIdentifier.value,
+      primaryIndentifierType: this.props.primaryIndentifierType.value,
+      secondaryIdentifier: this.props.secondaryIdentifier?.value,
+      secondaryIdentifierType: this.props.secondaryIdentifierType?.value,
     })
   }