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