Skip to content

Commit

Permalink
fix: duplicate new file name is not slugified
Browse files Browse the repository at this point in the history
& rm useless console.log
  • Loading branch information
wonknu committed Nov 15, 2016
1 parent 3864a14 commit e839e75
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cli/cms/operations/duplicate.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const duplicate = function(oldPostUrl, template, newPath, name, req, isUpdate =

let json = {}
let revisions = []
const newPostUrl = path.join(newPath, name)
const newPostUrl = path.join(newPath, coreUtils.slug.clean(name))
if(oldPostUrl != null) {
const files = Manager.instance.getList()
const oldPostDataPath = path.join(config.root, config.data.url, oldPostUrl.replace('.' + config.files.templates.extension, '.json'))
Expand All @@ -27,10 +27,7 @@ const duplicate = function(oldPostUrl, template, newPath, name, req, isUpdate =
revisions = posts[0].revisions
if(revisions != null && revisions[0] != null) {
json = cmsData.file.get(revisions[0].path)

json = extend(true, json, req.body)
console.log('* * * * * * * * * * * * * * * * * * * * * * * * * * * * *')
console.log('json', json)

delete json.abe_meta
}
Expand Down

0 comments on commit e839e75

Please sign in to comment.