Description
In backend/src/routes/api.js, the v1 lottery router is mapped to the v2 lottery implementation.
Location
backend/src/routes/api.js line 49:
v1Router.use(/lottery, v2Lottery);
Impact
- API versioning is misleading: consumers calling
/api/v1/lottery/ get v2 behavior
- If v1 and v2 diverge in the future, this will cause unexpected behavior changes
- Clients relying on v1 stability may break when v2 changes
Required Fix
Either:
- Create a separate v1 lottery implementation and use it here
- Or, if the lottery implementation is identical for v1/v2, document this decision clearly
- Add a deprecation notice for the v1 endpoint if it should be migrated to v2
Reference
Identified during full codebase audit of soroban-playground.
Description
In
backend/src/routes/api.js, the v1 lottery router is mapped to the v2 lottery implementation.Location
backend/src/routes/api.jsline 49:Impact
/api/v1/lottery/get v2 behaviorRequired Fix
Either:
Reference
Identified during full codebase audit of soroban-playground.