1
0
mirror of synced 2025-12-25 02:17:36 -05:00

add oneoff redirect

This commit is contained in:
Sarah Schneider
2021-04-26 15:35:14 -04:00
parent e046f1927e
commit 879c512b65

View File

@@ -99,6 +99,15 @@ module.exports = function getOldPathsFromPath (currentPath, languageCode, curren
}
// ------ END MODERN VERSION FORMAT REPLACEMENTS ------//
// ------ BEGIN ONEOFF REPLACEMENTS ------//
// create special old path /enterprise-server-releases from current path /enterprise-server@<release>/admin/all-releases
if (versionSatisfiesRange(currentVersion, `=${latest}`) && currentPath.endsWith('/admin/all-releases')) {
oldPaths.add('/enterprise-server-releases')
}
// ------ END ONEOFF REPLACEMENTS ------//
// For each old path added to the set above, do the following...
(new Set(oldPaths)).forEach(oldPath => {
// for English only, remove language code