fix(test): tests that got broken along the way

This commit is contained in:
Elian Doran
2025-03-15 17:51:10 +02:00
parent bc8cca664b
commit 2b966afbe1
7 changed files with 30 additions and 46 deletions

View File

@@ -131,6 +131,7 @@ function renderImageAttachment(image: SNote, res: Response, attachmentName: stri
function register(router: Router) {
function renderNote(note: SNote, req: Request, res: Response) {
if (!note) {
console.log("Unable to find note ", note);
res.status(404).render("share/404");
return;
}
@@ -215,6 +216,7 @@ function register(router: Router) {
const { shareId } = req.params;
console.log("Got share ", shareId, shaca.notes, shaca.aliasToNote);
const note = shaca.aliasToNote[shareId] || shaca.notes[shareId];
renderNote(note, req, res);