From ffa30881d5e4ecd1bc2a9f91cdd10ae25ac5516c Mon Sep 17 00:00:00 2001 From: Aileen Nowak Date: Tue, 17 Apr 2018 16:52:41 +0800 Subject: [PATCH] Replaced config routeKeyword with hardcoded one (#1004) refs TryGhost/Ghost#9561 - used the hardcoded routeKeyword for `preview` - removed `routeKeywords` from mirage configurations API fixtures --- ghost/admin/app/models/post.js | 5 +++-- ghost/admin/mirage/fixtures/configurations.js | 7 ------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/ghost/admin/app/models/post.js b/ghost/admin/app/models/post.js index bab2b44e5d..e8c8cac90c 100644 --- a/ghost/admin/app/models/post.js +++ b/ghost/admin/app/models/post.js @@ -180,10 +180,11 @@ export default Model.extend(Comparable, ValidationEngine, { 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 uuid = this.get('uuid'); - let previewKeyword = this.get('config.routeKeywords.preview'); + // routeKeywords.preview: 'p' + let previewKeyword = 'p'; // New posts don't have a preview if (!uuid) { return ''; diff --git a/ghost/admin/mirage/fixtures/configurations.js b/ghost/admin/mirage/fixtures/configurations.js index bf6336b59d..3fd9fce511 100644 --- a/ghost/admin/mirage/fixtures/configurations.js +++ b/ghost/admin/mirage/fixtures/configurations.js @@ -6,12 +6,5 @@ export default [{ fileStorage: 'true', internalTags: 'false', publicAPI: 'false', - routeKeywords: { - tag: 'tag', - author: 'author', - page: 'page', - preview: 'p', - private: 'private' - }, useGravatar: 'true' }];