@social-mail/social-mail-web-server 1.8.393 → 1.8.394

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.8.393",
3
+ "version": "1.8.394",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -10,6 +10,7 @@ import WebContentTranspileService from "./web-content/WebContentTranspileService
10
10
  import { ISiteFolder } from "./ISiteFolder.js";
11
11
  import EncryptionService from "../encryption/EncryptionService.js";
12
12
  import { hash } from "crypto";
13
+ import Sql from "@entity-access/entity-access/dist/sql/Sql.js";
13
14
 
14
15
  @RegisterScoped
15
16
  export default class WebSiteContentService
@@ -93,8 +94,9 @@ export default class WebSiteContentService
93
94
  async getFileInfo(folderID, ... segments: string[]): Promise<IFileInfo> {
94
95
  const [top, ... paths] = segments;
95
96
  const child = await this.db.appFiles
96
- .where({ folderID, top },(p) => (x) => x.parentID === p.folderID && x.name === p.top)
97
+ .where({ folderID, top },(p) => (x) => x.parentID === p.folderID && Sql.text.iLike(x.name, p.top))
97
98
  .orderBy(void 0, (p) => (x) => x.isDeleted)
99
+ .thenByDescending({ top }, (p) => (x) => x.name === p.top)
98
100
  .first();
99
101
  if (!child) {
100
102
  return null;