mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Add a fallback API version, allows tests to pass
- 😏
- this shouldn't really be a thing, but it's better than updating 52 tests...
This commit is contained in:
parent
3f88e7de63
commit
551e552928
1 changed files with 4 additions and 1 deletions
5
core/frontend/services/routing/bootstrap.js
vendored
5
core/frontend/services/routing/bootstrap.js
vendored
|
@ -9,6 +9,8 @@ const TaxonomyRouter = require('./TaxonomyRouter');
|
|||
const PreviewRouter = require('./PreviewRouter');
|
||||
const ParentRouter = require('./ParentRouter');
|
||||
|
||||
const defaultApiVersion = 'v3';
|
||||
|
||||
const registry = require('./registry');
|
||||
let siteRouter;
|
||||
|
||||
|
@ -37,7 +39,8 @@ module.exports.init = (options = {start: false}) => {
|
|||
registry.setRouter('siteRouter', siteRouter);
|
||||
|
||||
if (options.start) {
|
||||
this.start(options.start);
|
||||
let apiVersion = _.isBoolean(options.start) ? defaultApiVersion : options.start;
|
||||
this.start(apiVersion);
|
||||
}
|
||||
|
||||
return siteRouter.router();
|
||||
|
|
Loading…
Reference in a new issue