mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 06:12:03 +03:00
cc71bbfd61
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 |
||
---|---|---|
.. | ||
adapters | ||
api | ||
data | ||
lib | ||
models | ||
services | ||
views | ||
web | ||
analytics-events.js | ||
ghost-server.js | ||
notify.js | ||
overrides.js | ||
run-update-check.js | ||
update-check.js |