mirror of https://github.com/status-im/codimd.git
Fix create new note should not use default note created time
This commit is contained in:
parent
71f61b7f84
commit
18f7eb281c
|
@ -223,9 +223,11 @@ module.exports = function (sequelize, DataTypes) {
|
||||||
body = fs.readFileSync(filePath, 'utf8');
|
body = fs.readFileSync(filePath, 'utf8');
|
||||||
note.title = LZString.compressToBase64(Note.parseNoteTitle(body));
|
note.title = LZString.compressToBase64(Note.parseNoteTitle(body));
|
||||||
note.content = LZString.compressToBase64(body);
|
note.content = LZString.compressToBase64(body);
|
||||||
|
if (filePath !== config.defaultnotepath) {
|
||||||
note.createdAt = fsCreatedTime;
|
note.createdAt = fsCreatedTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// if no permission specified and have owner then give editable permission, else default permission is freely
|
// if no permission specified and have owner then give editable permission, else default permission is freely
|
||||||
if (!note.permission) {
|
if (!note.permission) {
|
||||||
if (note.ownerId) {
|
if (note.ownerId) {
|
||||||
|
|
Loading…
Reference in New Issue