summaryrefslogtreecommitdiff
path: root/lib/response.js
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-01-20 19:45:41 +0100
committerGitHub2018-01-20 19:45:41 +0100
commit268c81a3233c1407d6f6cf675e51bed97d8f4615 (patch)
tree62e8f8125b89844dfa97acfa534264be30e82b36 /lib/response.js
parent5d9a2c35698eeb7c29dc0b0b600dad4c6726528a (diff)
parentf47601857e9774731d5997f5c3b3256cf8bb623b (diff)
Merge pull request #673 from fooker/master
Allow posting new note with content
Diffstat (limited to '')
-rw-r--r--lib/response.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/response.js b/lib/response.js
index 6c64d245..1c04f9f6 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -119,7 +119,8 @@ function newNote (req, res, next) {
}
models.Note.create({
ownerId: owner,
- alias: req.alias ? req.alias : null
+ alias: req.alias ? req.alias : null,
+ content: req.body ? req.body : ''
}).then(function (note) {
return res.redirect(config.serverurl + '/' + LZString.compressToBase64(note.id))
}).catch(function (err) {