@social-mail/social-mail-web-server 1.4.759 → 1.4.760

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.4.759",
3
+ "version": "1.4.760",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -398,7 +398,9 @@ export default class SnapshotService {
398
398
  }
399
399
 
400
400
  fileName ??= child.name;
401
- link = `${cdn}/api/site/snapshot/${transform}/${this.snapshotRoot.appFileID}/${child.fileContentID}/${fileName}${query}`;
401
+ // we should not put snapshot id here
402
+ // as snapshot id will be re-generated each time...
403
+ link = `${cdn}/api/site/snapshot/${transform}/${this.root.appFileID}/${child.fileContentID}/${fileName}${query}`;
402
404
  return link;
403
405
 
404
406
  }
@@ -504,9 +506,7 @@ export default class SnapshotService {
504
506
 
505
507
  @cacheFor()
506
508
  async downloadSnapshotContent(fileContentID, link) {
507
- const path = `${this.snapshotRoot.appFileID}/%`;
508
- const file = await this.db.appFiles.where({ path, fileContentID }, (p) => (x) => Sql.text.like(x.path, p.path)
509
- && x.fileContentID === p.fileContentID
509
+ const file = await this.db.appFiles.where({ fileContentID }, (p) => (x) => x.fileContentID === p.fileContentID
510
510
  )
511
511
  .include((x) => x.fileContent)
512
512
  .first();