Ghost/core/server/services/routing/config/v2.js
Katharina Irrgang 6b758bda79
Refactored routing config for multiple api versions (#10333)
refs #10124

- one clean v0.1 and v2 config file for routing!
- solves one underlying bug reported in #10124
- the alias handling was just a hotfix to support v2 for the site
- but it was hard to read, ugly
- now we have two clean configs
- we'll see how useful it is
- need to do proper manual testing on Monday
2019-01-04 21:59:39 +01:00

55 lines
1.1 KiB
JavaScript

/* eslint-disable */
module.exports.QUERY = {
tag: {
controller: 'tagsPublic',
type: 'read',
resource: 'tags',
options: {
slug: '%s',
visibility: 'public'
}
},
author: {
controller: 'authors',
type: 'read',
resource: 'authors',
options: {
slug: '%s'
}
},
post: {
controller: 'posts',
type: 'read',
resource: 'posts',
options: {
slug: '%s'
}
},
page: {
controller: 'pages',
type: 'read',
resource: 'pages',
options: {
slug: '%s'
}
},
preview: {
controller: 'preview',
resource: 'preview'
}
};
module.exports.TAXONOMIES = {
tag: {
filter: 'tags:\'%s\'+tags.visibility:public',
editRedirect: '#/settings/tags/:slug/',
resource: 'tags'
},
author: {
filter: 'authors:\'%s\'',
editRedirect: '#/team/:slug/',
resource: 'authors'
}
};
/* eslint-enable */