Merge pull request #798 from hedgedoc/fix/default-note-freeurl
Fix note creation in FreeURL-mode does not apply default template
This commit is contained in:
commit
082939ac9a
@ -93,11 +93,12 @@ module.exports = function (sequelize, DataTypes) {
|
||||
if (!note.content) {
|
||||
var body = null
|
||||
let filePath = null
|
||||
if (!note.alias) {
|
||||
filePath = config.defaultNotePath
|
||||
} else {
|
||||
if (note.alias) {
|
||||
filePath = path.join(config.docsPath, note.alias + '.md')
|
||||
}
|
||||
if (!filePath || !Note.checkFileExist(filePath)) {
|
||||
filePath = config.defaultNotePath
|
||||
}
|
||||
if (Note.checkFileExist(filePath)) {
|
||||
var fsCreatedTime = moment(fs.statSync(filePath).ctime)
|
||||
body = fs.readFileSync(filePath, 'utf8')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user