@social-mail/social-mail-web-server 1.7.721 → 1.7.722

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.7.721",
3
+ "version": "1.7.722",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -15,6 +15,7 @@ import WorkflowContext from "@entity-access/entity-access/dist/workflows/Workflo
15
15
  import CopyTemplateWorkflow from "../../workflows/site/CopyTemplateWorkflow.js";
16
16
  import DeleteWebsiteWorkflow from "../../workflows/web-site/DeleteWebSiteWorkflow.js";
17
17
  import WebSiteVersionService from "../../services/files/WebSiteVersionService.js";
18
+ import { hash } from "crypto";
18
19
 
19
20
  export default class WebSiteEvents extends AuthenticatedEvents<WebSite> {
20
21
 
@@ -99,9 +100,13 @@ export default class WebSiteEvents extends AuthenticatedEvents<WebSite> {
99
100
 
100
101
  async copyTemplate(entity: WebSite) {
101
102
 
103
+ const { folderID, templateID } = entity;
104
+
102
105
  await this.context.queue(CopyTemplateWorkflow, {
103
- folderID: entity.folderID,
104
- templateID: entity.templateID
106
+ folderID,
107
+ templateID
108
+ }, {
109
+ id: `copy-template-${folderID}-${ hash("sha256", `${templateID}` as any, "hex")}`
105
110
  });
106
111
 
107
112
  }