Ghost/core/frontend/services/routing/config.js
Daniel Lockyer 3b6cdc2bc5
Renamed preview files to previews
refs https://github.com/TryGhost/Toolbox/issues/308

- we have a pattern of using plurals around Ghost but this was singular
- this shouldn't change any API functionality, it's just code
  refactoring
2022-04-28 15:37:14 +01:00

60 lines
1.2 KiB
JavaScript

module.exports.QUERY = {
tag: {
controller: 'tagsPublic',
type: 'read',
resource: 'tags',
options: {
slug: '%s',
visibility: 'public'
}
},
author: {
controller: 'authorsPublic',
type: 'read',
resource: 'authors',
options: {
slug: '%s'
}
},
post: {
controller: 'postsPublic',
type: 'read',
resource: 'posts',
options: {
slug: '%s'
}
},
page: {
controller: 'pagesPublic',
type: 'read',
resource: 'pages',
options: {
slug: '%s'
}
},
previews: {
controller: 'previews',
resource: 'previews'
},
email: {
controller: 'emailPost',
resource: 'email_posts',
options: {
slug: '%s'
}
}
};
module.exports.TAXONOMIES = {
tag: {
filter: 'tags:\'%s\'+tags.visibility:public',
editRedirect: '#/tags/:slug/',
resource: 'tags'
},
author: {
filter: 'authors:\'%s\'',
editRedirect: '#/settings/staff/:slug/',
resource: 'authors'
}
};