Browse Source

fix(syncing-server): add user uuid for the emails requesting backup

Karol Sójko 1 năm trước cách đây
mục cha
commit
7b0ea0a069

+ 1 - 0
packages/domain-events/src/Domain/Event/EmailRequestedEventPayload.ts

@@ -12,4 +12,5 @@ export interface EmailRequestedEventPayload {
     attachmentFileName: string
     attachmentContentType: string
   }>
+  userUuid?: string
 }

+ 1 - 0
packages/syncing-server/src/Domain/Event/DomainEventFactory.ts

@@ -329,6 +329,7 @@ export class DomainEventFactory implements DomainEventFactoryInterface {
       attachmentFileName: string
       attachmentContentType: string
     }>
+    userUuid?: string
   }): EmailRequestedEvent {
     return {
       type: 'EMAIL_REQUESTED',

+ 1 - 0
packages/syncing-server/src/Domain/Event/DomainEventFactoryInterface.ts

@@ -74,6 +74,7 @@ export interface DomainEventFactoryInterface {
       attachmentFileName: string
       attachmentContentType: string
     }>
+    userUuid?: string
   }): EmailRequestedEvent
   createDuplicateItemSyncedEvent(dto: { itemUuid: string; userUuid: string }): DuplicateItemSyncedEvent
   createItemRevisionCreationRequested(dto: { itemUuid: string; userUuid: string }): ItemRevisionCreationRequestedEvent

+ 1 - 0
packages/syncing-server/src/Domain/Handler/EmailBackupRequestedEventHandler.ts

@@ -81,6 +81,7 @@ export class EmailBackupRequestedEventHandler implements DomainEventHandlerInter
               attachmentContentType: 'application/json',
             },
           ],
+          userUuid: event.payload.userUuid,
         }),
       )
     }