-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
23 changed files
with
4,683 additions
and
2,035 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* 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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.