mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Bumped default API version export to be canary/v4
refs https://github.com/TryGhost/Team/issues/856 - The default internal version of the API is expected to be the latest one available which is v4/canary at the moment. - There will be more information posted in the referenced issue later around how to approach the "default version", for now it's just a change to make a small step into a right direction.
This commit is contained in:
parent
11f37a9363
commit
dfe1089ee2
@ -1,6 +1,10 @@
|
||||
module.exports = require('./v3');
|
||||
module.exports.canary = require('./canary');
|
||||
module.exports.v4 = require('./canary');
|
||||
module.exports.shared = require('./shared');
|
||||
|
||||
const defaultAPI = require('./canary');
|
||||
|
||||
module.exports = defaultAPI;
|
||||
module.exports.canary = defaultAPI;
|
||||
module.exports.v4 = defaultAPI;
|
||||
module.exports.v3 = require('./v3');
|
||||
module.exports.v2 = require('./v2');
|
||||
module.exports.shared = require('./shared');
|
||||
|
||||
|
@ -9,6 +9,7 @@ const api = require('../../../core/server/api');
|
||||
helpers.next_post = helpers.prev_post;
|
||||
|
||||
describe('{{next_post}} helper', function () {
|
||||
const apiVersion = 'canary';
|
||||
let locals;
|
||||
let browsePostsStub;
|
||||
|
||||
@ -16,7 +17,7 @@ describe('{{next_post}} helper', function () {
|
||||
locals = {
|
||||
root: {
|
||||
_locals: {
|
||||
apiVersion: 'v3'
|
||||
apiVersion: apiVersion
|
||||
},
|
||||
context: ['post']
|
||||
}
|
||||
@ -147,7 +148,7 @@ describe('{{next_post}} helper', function () {
|
||||
locals = {
|
||||
root: {
|
||||
_locals: {
|
||||
apiVersion: 'v2'
|
||||
apiVersion: apiVersion
|
||||
},
|
||||
context: ['page']
|
||||
}
|
||||
@ -191,7 +192,7 @@ describe('{{next_post}} helper', function () {
|
||||
locals = {
|
||||
root: {
|
||||
_locals: {
|
||||
apiVersion: 'v2'
|
||||
apiVersion: apiVersion
|
||||
},
|
||||
context: ['preview', 'post']
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ const helpers = require('../../../core/frontend/helpers');
|
||||
const api = require('../../../core/server/api');
|
||||
|
||||
describe('{{prev_post}} helper', function () {
|
||||
const apiVersion = 'canary';
|
||||
let browsePostsStub;
|
||||
let locals;
|
||||
|
||||
@ -13,7 +14,7 @@ describe('{{prev_post}} helper', function () {
|
||||
locals = {
|
||||
root: {
|
||||
_locals: {
|
||||
apiVersion: 'v3'
|
||||
apiVersion: apiVersion
|
||||
},
|
||||
context: ['post']
|
||||
}
|
||||
@ -142,7 +143,7 @@ describe('{{prev_post}} helper', function () {
|
||||
locals = {
|
||||
root: {
|
||||
_locals: {
|
||||
apiVersion: 'v2'
|
||||
apiVersion: apiVersion
|
||||
},
|
||||
context: ['page']
|
||||
}
|
||||
@ -186,7 +187,7 @@ describe('{{prev_post}} helper', function () {
|
||||
locals = {
|
||||
root: {
|
||||
_locals: {
|
||||
apiVersion: 'v2'
|
||||
apiVersion: apiVersion
|
||||
},
|
||||
context: ['preview', 'post']
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user