Skip to content

Commit d35f6f3

Browse files
committed
first try
1 parent 1783713 commit d35f6f3

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ markedDark.use(
8383
import axios from "axios";
8484

8585
import { config } from "dotenv";
86-
import path from "path";
86+
import path from "node:path";
8787
import fs from "fs";
8888
const __dirname = import.meta.dirname;
8989

middlewares/keycloak-middleware.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ export async function setUserAttribute(req, attributeName, attributeValue) {
241241
})
242242
.then((response) => {
243243
if (!response.ok) {
244-
console.log('url', url);
245-
console.log('response', JSON.stringify(response, null, 2));
244+
// console.log('url', url);
245+
// console.log('response', JSON.stringify(response, null, 2));
246246
throw new Error("Failed to update attribute " + JSON.stringify({ mergedAttributes: mergedAttributes }, null, 2));
247247
}
248248
return true;

obsidian.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,13 +777,20 @@ async function getDirectoryListing(req) {
777777
})
778778
);
779779
const filteredFiles = files.filter((f) => f !== null);
780+
await getSelectedPage(req, filteredFiles);
780781
let r = await getDirectoryListingInternal(req, filteredFiles, []);
781782
if (filteredFiles[filteredFiles.length - 1].folders.length > 0) {
782783
r += `</div></div>`;
783784
}
784785
return r;
785786
}
786787

788+
async function getSelectedPage(req, files) {
789+
// console.log("getSelectedPage", req);
790+
console.log("getSelectedPage", files);
791+
console.log('parsedOriginalUrl', req._parsedUrl.path);
792+
}
793+
787794
async function getDirectoryListingInternal(req, files, folders) {
788795
let html = "";
789796
let lastProcessedFileIndex = -1;

0 commit comments

Comments
 (0)