mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
parent
4cac084bd0
commit
fd79ed5317
2 changed files with 3 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
/*global Ember */
|
|
||||||
|
|
||||||
var trailingHistory = Ember.HistoryLocation.extend({
|
var trailingHistory = Ember.HistoryLocation.extend({
|
||||||
formatURL: function () {
|
formatURL: function () {
|
||||||
|
|
|
@ -9,8 +9,7 @@ export default AuthenticatedRoute.extend(ShortcutsRoute, PaginationRouteMixin, {
|
||||||
paginationModel: 'post',
|
paginationModel: 'post',
|
||||||
paginationSettings: {
|
paginationSettings: {
|
||||||
status: 'all',
|
status: 'all',
|
||||||
staticPages: 'all',
|
staticPages: 'all'
|
||||||
filter: ''
|
|
||||||
},
|
},
|
||||||
|
|
||||||
model: function () {
|
model: function () {
|
||||||
|
@ -19,7 +18,8 @@ export default AuthenticatedRoute.extend(ShortcutsRoute, PaginationRouteMixin, {
|
||||||
|
|
||||||
return this.get('session.user').then(function (user) {
|
return this.get('session.user').then(function (user) {
|
||||||
if (user.get('isAuthor')) {
|
if (user.get('isAuthor')) {
|
||||||
paginationSettings.filter += `+author:${user.get('slug')}`;
|
paginationSettings.filter = paginationSettings.filter ?
|
||||||
|
`${paginationSettings.filter}+author:${user.get('slug')}` : `author:${user.get('slug')}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return self.loadFirstPage().then(function () {
|
return self.loadFirstPage().then(function () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue