We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b906039 commit 03bdee2Copy full SHA for 03bdee2
1 file changed
lib/models/note.js
@@ -208,9 +208,11 @@ module.exports = function (sequelize, DataTypes) {
208
filePath = path.join(config.docspath, note.alias + '.md');
209
}
210
if (Note.checkFileExist(filePath)) {
211
+ var fsCreatedTime = moment(fs.statSync(filePath).ctime);
212
body = fs.readFileSync(filePath, 'utf8');
213
note.title = LZString.compressToBase64(Note.parseNoteTitle(body));
214
note.content = LZString.compressToBase64(body);
215
+ note.createdAt = fsCreatedTime;
216
217
218
// if no permission specified and have owner then give editable permission, else default permission is freely
0 commit comments