@social-mail/social-mail-web-server 1.4.707 → 1.4.708

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.707",
3
+ "version": "1.4.708",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -4,8 +4,18 @@ import Table from "@entity-access/entity-access/dist/decorators/Table.js";
4
4
  import { User } from "./User.js";
5
5
  import AppFile from "./AppFile.js";
6
6
  import Mailbox from "./Mailbox.js";
7
+ import Index from "@entity-access/entity-access/dist/decorators/Index.js";
7
8
 
8
9
  @Table("UserPins")
10
+ @Index({
11
+ name: "IX_UserPins_UseID",
12
+ columns: [
13
+ { name: (x) => x.userID, descending: false },
14
+ { name: (x) => x.appFileID, descending: false},
15
+ { name: (x) => x.mailboxID, descending: false},
16
+ ],
17
+ unique: true
18
+ })
9
19
  export default class UserPin {
10
20
 
11
21
  @Column({ dataType: "BigInt", key: true, generated: "identity"})
@@ -34,7 +34,7 @@ export default class StoreConfigService {
34
34
  const db = scope.resolve(SocialMailContext);
35
35
  return await db.appFiles.where({ host, folderID }, (p) => (x) =>
36
36
  x.appFileID === p.folderID
37
- && x.storeItems.some((s) => s.active === true && s.store.storeWebsites.some((w) => w.website.hosts.some((h) => h.host === p.host)))
37
+ && x.stores.some((s) => s.storeWebsites.some((w) => w.website.hosts.some((h) => h.host === p.host)))
38
38
  ).first();
39
39
  }
40
40