From 25e5cb46de80c0c492251daccfa502999e22b1fa Mon Sep 17 00:00:00 2001 From: Naz Date: Mon, 21 Mar 2022 19:11:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20`/canary/`=20API=20endpo?= =?UTF-8?q?ints=20404s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs https://github.com/TryGhost/Toolbox/issues/169 refs https://github.com/TryGhost/Ghost/commit/7becf0a2b291e2f24cba4d85ba0a83fffba13a37 - The referenced commit has dropped existance of Content and Admin APIs under `/canary/` prefix, which made a breaking change and clients that are still relying on "canary" started to break. - The `/canary/` prefix should be used up untill the introduction of Ghost v5, otherwise we run the risk of accidentally breaking API clients. --- core/server/web/api/app.js | 3 +++ core/shared/config/overrides.json | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/server/web/api/app.js b/core/server/web/api/app.js index 13006b2011..e3fed88cea 100644 --- a/core/server/web/api/app.js +++ b/core/server/web/api/app.js @@ -22,6 +22,9 @@ module.exports = function setupApiApp() { apiApp.lazyUse(urlUtils.getVersionPath({version: 'v4', type: 'content'}), require('./canary/content/app')); apiApp.lazyUse(urlUtils.getVersionPath({version: 'v4', type: 'admin'}), require('./canary/admin/app')); + apiApp.lazyUse(urlUtils.getVersionPath({version: 'v5', type: 'content'}), require('./canary/content/app')); + apiApp.lazyUse(urlUtils.getVersionPath({version: 'v5', type: 'admin'}), require('./canary/admin/app')); + apiApp.lazyUse(urlUtils.getVersionPath({version: 'canary', type: 'content'}), require('./canary/content/app')); apiApp.lazyUse(urlUtils.getVersionPath({version: 'canary', type: 'admin'}), require('./canary/admin/app')); diff --git a/core/shared/config/overrides.json b/core/shared/config/overrides.json index 6141994769..ab65e2fffd 100644 --- a/core/shared/config/overrides.json +++ b/core/shared/config/overrides.json @@ -82,8 +82,8 @@ "all": ["v2", "v3", "v4", "v5", "canary"], "default": "v4", "canary": { - "admin": "admin", - "content": "content" + "admin": "canary/admin", + "content": "canary/content" }, "v5": { "admin": "admin",