Ghost/core/server
Naz cc71bbfd61 Hooked up api version compatibility middleware
refs https://github.com/TryGhost/Toolbox/issues/280

- ctd of putting pieces together to allow Ghost notifying owner and admin users about version mismatch errors
-  The `@tryghost/mw-api-version-mismatch` in a combination with api version compatibility service make the whole notification process play nicely :)
- The flow of the logic from the request to a sent notification email is following:
1. Request comes is with an Accept-Version header that's behind current Ghost version and is not supported
2. mw-error-handler middleware's 'resourceNotFound' detects such request and returns a 406 with a special 'code' identifying if the version of the client is ahead or behind
3. mw-api-version-mismatch intercepts the 406 request with "code === 'UPDATE_CLIENT'` and calls up APIVersionCompatibilityService
4. emails are sent out to active owner and admin users

- The above flow is also illustratd in the e2e tests that come with the changeset
2022-04-22 16:31:56 +08:00
..
adapters Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
api Replaced stats service with @tryghost/stats-service (#14527) 2022-04-21 14:57:07 +01:00
data Added version_notifications key to settings table 2022-04-21 20:34:19 +08:00
lib Updated probe-image-size options to reflect underlying change 2022-03-09 20:27:38 +00:00
models Replaced white/black list terminology 2022-04-19 11:19:59 +01:00
services Hooked up api version compatibility service 2022-04-22 16:31:56 +08:00
views Updated unsubscribe page 2022-03-10 10:39:20 +00:00
web Hooked up api version compatibility middleware 2022-04-22 16:31:56 +08:00
analytics-events.js Added comments to all usages of lib/common/events 2021-07-07 16:02:44 +01:00
ghost-server.js Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
notify.js Removed unused import 2021-12-06 08:17:07 +00:00
overrides.js Set global Luxon timezone override to UTC 2021-10-20 09:19:29 +02:00
run-update-check.js Revert "Revert "Extract logging from DI patterns, only use @tryghost/logging package"" (#13884) 2021-12-14 11:22:39 +00:00
update-check.js Added library for extracting database information 2022-01-18 09:31:08 +00:00