feat: editor - existing content

This commit is contained in:
Nicolas Giard
2018-09-16 18:36:15 -04:00
parent 20f2fd29fe
commit 30806d3c8d
11 changed files with 113 additions and 20 deletions

View File

@@ -21,8 +21,11 @@ module.exports = {
// Extract Info
let pathParts = _.filter(_.split(rawPath, '/'), p => !_.isEmpty(p))
if (pathParts[0].length === 1) {
pathParts.shift()
}
if (pathParts[0].length === 2) {
pathObj = pathParts[0]
pathObj.locale = pathParts[0]
pathParts.shift()
}
pathObj.path = _.join(pathParts, '/')