feat: pages admin + path parsing fixes

This commit is contained in:
Nick
2019-07-02 01:48:19 -04:00
parent 4f968cf230
commit 13f172978f
13 changed files with 454 additions and 45 deletions

View File

@@ -125,6 +125,10 @@ module.exports = {
message: 'Cannot create this page because an entry already exists at the same path.',
code: 6002
}),
PageNotFound: CustomError('PageNotFound', {
message: 'This page does not exist.',
code: 6003
}),
SearchActivationFailed: CustomError('SearchActivationFailed', {
message: 'Search Engine activation failed.',
code: 4002

View File

@@ -16,7 +16,8 @@ module.exports = {
locale: WIKI.config.lang.code,
path: 'home',
private: false,
privateNS: ''
privateNS: '',
explicitLocale: false
}
// Clean Path
@@ -31,6 +32,7 @@ module.exports = {
}
if (localeSegmentRegex.test(pathParts[0])) {
pathObj.locale = pathParts[0]
pathObj.explicitLocale = true
pathParts.shift()
}