Skip to content

Commit

Permalink
fix: ensure backward compatibility (#2690)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmrgt authored Nov 14, 2024
1 parent b193408 commit 1b91214
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/pdc/proxy/helpers/registerExpressRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ export function registerExpressRoute(app: express.Express, kernel: KernelInterfa
setSentryUser(req);
const { api_version, ...rparams } = req.params;

const versionRange = semver.tryParseRange(api_version);
// FIXME: This is a dirty hack to ensure backward compatibility
const apiVersion = api_version == "v3" ? "v3.0" : api_version;

const versionRange = semver.tryParseRange(apiVersion);
if (!versionRange) {
return res.status(404).end();
}
Expand Down

0 comments on commit 1b91214

Please sign in to comment.