summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/web/note/util.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/web/note/util.js b/lib/web/note/util.js
index f1af1300..9c6c1c8a 100644
--- a/lib/web/note/util.js
+++ b/lib/web/note/util.js
@@ -59,7 +59,8 @@ exports.newNote = function (req, res, body) {
models.Note.create({
ownerId: owner,
alias: req.alias ? req.alias : null,
- content: body
+ content: body,
+ title: models.Note.parseNoteTitle(body)
}).then(function (note) {
return res.redirect(config.serverURL + '/' + (note.alias ? note.alias : models.Note.encodeNoteId(note.id)))
}).catch(function (err) {