@social-mail/social-mail-web-server 1.9.28 → 1.9.29

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.9.28",
3
+ "version": "1.9.29",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -122,15 +122,13 @@ export default class WebSiteContentService
122
122
  }
123
123
 
124
124
  async getCurrentSnapshot(folderID) {
125
-
126
- const site = await this.db.websiteFolders.where({ folderID }, (p) => (x) =>
127
- x.folderID === p.folderID)
128
- .first();
129
- if (!site) {
125
+ const siteHost = await this.db.websiteFolderHosts.where({ folderID }, (p) => (x) => x.folderID === p.folderID )
126
+ .include((x) => x.folder)
127
+ .first();
128
+ if (!siteHost) {
130
129
  return null;
131
130
  }
132
- const { host } = await this.db.websiteFolderHosts.where({ folderID }, (p) => (x) => x.folderID === p.folderID )
133
- .first();
131
+ const { folder: site, host } = siteHost;
134
132
  return {
135
133
  snapshotFolderID: site.currentVersionID,
136
134
  folderID: site.folderID,