Merge remote-tracking branch 'origin/stable'

# Conflicts:
#	package-lock.json
#	package.json
#	src/services/build.js
This commit is contained in:
zadam
2022-07-01 22:34:19 +02:00
8 changed files with 69 additions and 25 deletions

View File

@@ -45,7 +45,9 @@ function downloadNoteFile(noteId, res, contentDisposition = true) {
const note = becca.getNote(noteId);
if (!note) {
return res.status(404).send(`Note ${noteId} doesn't exist.`);
return res.setHeader("Content-Type", "text/plain")
.status(404)
.send(`Note ${noteId} doesn't exist.`);
}
if (note.isProtected && !protectedSessionService.isProtectedSessionAvailable()) {