various tweaks to shared notes

This commit is contained in:
zadam
2021-12-27 20:48:14 +01:00
parent b8fe9a41db
commit 3128a7d62f
6 changed files with 132 additions and 71 deletions

View File

@@ -29,13 +29,15 @@ function register(router) {
const note = shaca.aliasToNote[shareId] || shaca.notes[shareId];
if (note) {
const content = contentRenderer.getContent(note);
const {header, content, isEmpty} = contentRenderer.getContent(note);
const subRoot = getSharedSubTreeRoot(note);
res.render("share/page", {
note,
header,
content,
isEmpty,
subRoot
});
}
@@ -78,7 +80,7 @@ function register(router) {
res.send(note.getContent());
});
router.get('/share/api/notes/:noteId/view', (req, res, next) => {
const {noteId} = req.params;
const note = shaca.getNote(noteId);