chore(server): address self-review

This commit is contained in:
Elian Doran
2025-12-28 12:01:10 +02:00
parent 12875ec308
commit c2c19e8ecd
3 changed files with 1 additions and 8828 deletions

View File

@@ -39,7 +39,7 @@ async function register(app: express.Application) {
} else {
const publicDir = path.join(resourceDir, "public");
if (!existsSync(publicDir)) {
throw new Error(`Public directory is missing at: ${ path.resolve(publicDir)}`);
throw new Error(`Public directory is missing at: ${path.resolve(publicDir)}`);
}
app.use(`/${assetUrlFragment}/src`, persistentCacheStatic(path.join(publicDir, "src")));

View File

@@ -138,7 +138,6 @@ describe("CSS generation", () => {
expect(processedResult).toBeTruthy();
const css = generateCss(processedResult!, `/api/attachments/${processedResult?.fontAttachmentId}/download`);
console.log(css);
expect(css).toContain("@font-face");
expect(css).toContain("font-family: 'trilium-icon-pack-bx'");
expect(css).toContain(`src: url('/api/attachments/${processedResult?.fontAttachmentId}/download') format('woff2');`);