make :filename for GETing an image optional

This commit is contained in:
Tom
2022-04-11 21:50:10 +02:00
parent e156c6292b
commit f53a93e828
2 changed files with 2 additions and 2 deletions

View File

@@ -108,7 +108,7 @@ function register(router) {
res.send(note.getContent());
});
router.get('/share/api/images/:noteId/:filename', (req, res, next) => {
router.get(['/share/api/images/:noteId/:filename', '/share/api/images/:noteId'], (req, res, next) => {
const image = shaca.getNote(req.params.noteId);
if (!image) {