summaryrefslogtreecommitdiff
path: root/lib/response.js
diff options
context:
space:
mode:
authorDustin Frisch2018-01-11 00:51:22 +0100
committerDustin Frisch2018-01-18 10:41:58 +0100
commitf47601857e9774731d5997f5c3b3256cf8bb623b (patch)
tree46cbf3dc02ea8a7d8a5b072504bacec0a9d3ab1b /lib/response.js
parenta8fa88831705625e053c7d493a4b2f83b7b2a4a8 (diff)
Allow posting new note with content
Signed-off-by: Dustin Frisch <fooker@lab.sh>
Diffstat (limited to 'lib/response.js')
-rw-r--r--lib/response.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/response.js b/lib/response.js
index 9f3d5a44..2e8924b7 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -117,7 +117,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) {