mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
💡 Pinned frontend API version to canary
- Ghost themes are allowed to define the API version they want to use, but this concept has never really worked correctly - We have a theory that it doesn't ever do quite what people want, and so always loading latest would not really break anything - this commit tests that theory - We're pinning to canary, as we're aiming to get rid of the concept of versions altogether - I could have done return config.get('api:versions:default');, but this actually returns v4 (although the same as canary, conceptually different) and it also seemed like an unnecessary level of indirection. This change should be easy to understand and to revert if we are wrong
This commit is contained in:
parent
06a4dd7456
commit
d1e5ccae14
1 changed files with 2 additions and 6 deletions
|
@ -12,7 +12,6 @@
|
|||
|
||||
const debug = require('@tryghost/debug')('bridge');
|
||||
const errors = require('@tryghost/errors');
|
||||
const config = require('./shared/config');
|
||||
const logging = require('@tryghost/logging');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const themeEngine = require('./frontend/services/theme-engine');
|
||||
|
@ -83,11 +82,8 @@ class Bridge {
|
|||
}
|
||||
|
||||
getFrontendApiVersion() {
|
||||
if (this.getActiveTheme()) {
|
||||
return this.getActiveTheme().engine('ghost-api');
|
||||
} else {
|
||||
return config.get('api:versions:default');
|
||||
}
|
||||
// @NOTE: we've pinned the frontend to canary in a step towards removing API versions
|
||||
return 'canary';
|
||||
}
|
||||
|
||||
getCardAssetConfig() {
|
||||
|
|
Loading…
Add table
Reference in a new issue