diff options
author | Cheng-Han, Wu | 2016-06-17 16:28:04 +0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-06-17 16:28:04 +0800 |
commit | 18f7eb281c79294ac79ab4896ea74509c4733ea8 (patch) | |
tree | b21ede92054c830172ddecb4adb230f5c4fcdc14 /lib/models | |
parent | 71f61b7f840b7e557d44b130e69fdb3c9e24d6d9 (diff) |
Fix create new note should not use default note created time
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/note.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/models/note.js b/lib/models/note.js index ace072a3..a442f889 100644 --- a/lib/models/note.js +++ b/lib/models/note.js @@ -223,7 +223,9 @@ module.exports = function (sequelize, DataTypes) { body = fs.readFileSync(filePath, 'utf8'); note.title = LZString.compressToBase64(Note.parseNoteTitle(body)); note.content = LZString.compressToBase64(body); - note.createdAt = fsCreatedTime; + if (filePath !== config.defaultnotepath) { + note.createdAt = fsCreatedTime; + } } } // if no permission specified and have owner then give editable permission, else default permission is freely |