💥 Removed the /redirects/json route alias

no issue

This route had been deprecated and wasn't used anymore. You should switch to `GET /redirects/download` and `POST /redirects/upload` instead.
This commit is contained in:
Thibaut Patel 2021-03-17 15:58:28 +01:00
parent 35e45dbe7b
commit 63d55570a3

View File

@ -228,15 +228,6 @@ module.exports = function apiRoutes() {
router.del('/invites/:id', mw.authAdminApi, http(apiCanary.invites.destroy));
// ## Redirects
// TODO: yaml support has been added to https://github.com/TryGhost/Ghost/issues/11085
// The `/json` endpoints below are left for backward compatibility. They'll be removed in v4.
router.get('/redirects/json', mw.authAdminApi, http(apiCanary.redirects.download));
router.post('/redirects/json',
mw.authAdminApi,
apiMw.upload.single('redirects'),
apiMw.upload.validation({type: 'redirects'}),
http(apiCanary.redirects.upload)
);
router.get('/redirects/download', mw.authAdminApi, http(apiCanary.redirects.download));
router.post('/redirects/upload',
mw.authAdminApi,