Skip to content

Commit

Permalink
refactoring:removing dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Oct 31, 2016
1 parent 429a0d5 commit c825726
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/cli/cms/data/metas.js
Expand Up @@ -26,27 +26,3 @@ export function add(tpl, json, type, obj = {}, date = null, realType = 'draft')
json[meta][type].latest.date = currentDate
json[meta][type].latest.abeUrl = abeUrl
}

export function get(arr) {
var res = []
Array.prototype.forEach.call(arr, (file) => {
let meta = config.meta.name

var jsonPath = cmsData.file.fromUrl(file.path).json.path
var json = cmsData.file.get(jsonPath)
if(json[meta] == null) json[meta] = {}
file['template'] = json[meta].template
if(json[meta].latest != null) {
file['date'] = json[meta].latest.date
}
if(json[meta].complete == null) {
json[meta].complete = 0
}
if(json[meta] != null) {
file[config.meta.name] = json[meta]
}
res.push(file)
})

return res
}

0 comments on commit c825726

Please sign in to comment.