share: Render mind map

This commit is contained in:
Elian Doran 2024-09-01 22:41:48 +03:00
parent 1437df7de1
commit 5c2446be67
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,7 @@ function getContent(note: SNote) {
renderCode(result);
} else if (note.type === 'mermaid') {
renderMermaid(result, note);
} else if (note.type === 'image' || note.type === 'canvas') {
} else if ([ "image", "canvas", "mindMap"].includes(note.type)) {
renderImage(result, note);
} else if (note.type === 'file') {
renderFile(note, result);

View File

@ -279,6 +279,8 @@ function register(router: Router) {
renderImageAttachment(image, res, 'canvas-export.svg');
} else if (image.type === 'mermaid') {
renderImageAttachment(image, res, 'mermaid-export.svg');
} else if (image.type === "mindMap") {
renderImageAttachment(image, res, 'mindmap-export.svg');
} else {
return res.status(400)
.json({ message: "Requested note is not a shareable image" });