Replaced config routeKeyword with hardcoded one (#1004)

refs TryGhost/Ghost#9561

- used the hardcoded routeKeyword for `preview`
- removed `routeKeywords` from mirage configurations API fixtures
This commit is contained in:
Aileen Nowak 2018-04-17 16:52:41 +08:00 committed by Kevin Ansfield
parent ae759d39ea
commit ffa30881d5
2 changed files with 3 additions and 9 deletions

View File

@ -180,10 +180,11 @@ export default Model.extend(Comparable, ValidationEngine, {
return this.get('ghostPaths.url').join(blogUrl, postUrl); return this.get('ghostPaths.url').join(blogUrl, postUrl);
}), }),
previewUrl: computed('uuid', 'ghostPaths.url', 'config.{blogUrl,routeKeywords.preview}', function () { previewUrl: computed('uuid', 'ghostPaths.url', 'config.blogUrl', function () {
let blogUrl = this.get('config.blogUrl'); let blogUrl = this.get('config.blogUrl');
let uuid = this.get('uuid'); let uuid = this.get('uuid');
let previewKeyword = this.get('config.routeKeywords.preview'); // routeKeywords.preview: 'p'
let previewKeyword = 'p';
// New posts don't have a preview // New posts don't have a preview
if (!uuid) { if (!uuid) {
return ''; return '';

View File

@ -6,12 +6,5 @@ export default [{
fileStorage: 'true', fileStorage: 'true',
internalTags: 'false', internalTags: 'false',
publicAPI: 'false', publicAPI: 'false',
routeKeywords: {
tag: 'tag',
author: 'author',
page: 'page',
preview: 'p',
private: 'private'
},
useGravatar: 'true' useGravatar: 'true'
}]; }];