Skip to content

Commit

Permalink
Merged branch master into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Nov 15, 2016
2 parents e7f847a + e839e75 commit 38a91bc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cli/cms/operations/duplicate.js
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 38a91bc

Please sign in to comment.