0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/test
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
..
e2e-api Hooked up api version compatibility middleware 2022-04-22 16:31:56 +08:00
e2e-browser Added note about installing the E2E browsers 2022-02-22 10:20:40 +01:00
e2e-frontend 🐛 Fixed post access in the get helper (#14282) 2022-03-17 11:14:29 +01:00
e2e-server Added MRR stats service and endpoint (#14427) 2022-04-08 09:18:04 +02:00
integration Added version_notifications key to settings table 2022-04-21 20:34:19 +08:00
regression Added version_notifications key to settings table 2022-04-21 20:34:19 +08:00
unit Replaced stats service with @tryghost/stats-service (#14527) 2022-04-21 14:57:07 +01:00
utils Added version_notifications key to settings table 2022-04-21 20:34:19 +08:00
.eslintignore Updated casper test fixture to latest version 2022-01-25 14:10:53 +00:00
.eslintrc.js
.jshintrc