Added Ecml routing #193
Conversation
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughThe changes update dependencies (axios, passport, pg), rebrand package names from "cms" to "ecml-cms", redirect assessment item routes to new learning-service endpoints with fallback to legacy itemset paths, and modify JWT guard instantiation in middleware. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
src/common/middleware/apiConfig.ts (1)
1560-1560: Address TODO comment.The comment "make similar changes for others" indicates incomplete work. Clarify which other routes need similar updates and track this in the PR or create follow-up issues.
Would you like me to search for other assessment-related routes that might need similar updates?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
package.json(2 hunks)src/common/middleware/apiConfig.ts(1 hunks)src/common/middleware/middleware.service.ts(2 hunks)src/constant/routeConfig.js(120 hunks)
🧰 Additional context used
🪛 Biome (2.1.2)
src/constant/routeConfig.js
[error] 11-11: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 24-24: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 37-37: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 50-50: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 63-63: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 76-76: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 89-89: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 115-115: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 128-128: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 167-167: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 180-180: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 193-193: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 206-206: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 219-219: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 232-232: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 245-245: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 258-258: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 271-271: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 284-284: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 297-297: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 310-310: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 323-323: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 336-336: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 349-349: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 362-362: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 375-375: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 388-388: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 401-401: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 414-414: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 427-427: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 440-440: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 453-453: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 466-466: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 479-479: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 492-492: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 505-505: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 518-518: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 531-531: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 544-544: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 557-557: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 570-570: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 583-583: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 596-596: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 609-609: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 622-622: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 635-635: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 648-648: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 661-661: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 674-674: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 687-687: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 700-700: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 713-713: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 726-726: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 739-739: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 752-752: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 765-765: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 778-778: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 791-791: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 804-804: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 817-817: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 830-830: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 843-843: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 856-856: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 869-869: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 882-882: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 895-895: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 908-908: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 921-921: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 934-934: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 947-947: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 960-960: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 973-973: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 986-986: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 999-999: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1012-1012: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1026-1026: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1039-1039: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1052-1052: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1065-1065: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1078-1078: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1091-1091: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1104-1104: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1117-1117: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1130-1130: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1143-1143: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1156-1156: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1169-1169: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1182-1182: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1195-1195: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1208-1208: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1221-1221: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1234-1234: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1247-1247: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1260-1260: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1273-1273: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1286-1286: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1299-1299: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1312-1312: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1325-1325: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1338-1338: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1351-1351: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1364-1364: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1377-1377: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1390-1390: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1403-1403: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1416-1416: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1429-1429: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1442-1442: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1455-1455: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1468-1468: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1481-1481: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1494-1494: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1507-1507: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1520-1520: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1533-1533: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1546-1546: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1559-1559: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1562-1562: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1563-1563: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1565-1565: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1572-1572: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1575-1575: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1576-1576: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1578-1578: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1585-1585: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1588-1588: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1589-1589: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1591-1591: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1598-1598: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1601-1601: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1602-1602: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1604-1604: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1611-1611: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1614-1614: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1615-1615: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1617-1617: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1624-1624: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
🔇 Additional comments (3)
src/constant/routeConfig.js (1)
11-1558: LGTM: Package rebranding applied consistently.The rebranding from "cms"/"shiksha-cms" to "ecml-cms"/"shiksha-ecml-cms" is applied consistently across all existing routes.
src/common/middleware/middleware.service.ts (1)
269-270: This review comment is based on incorrect code state.The route
/action/assessmentcurrently routes toASSESSMENT_SERVICE, notLEARNING_SERVICEas claimed. This is consistent with other assessment-related routes (/api/question,/action/question,/action/questionset), which all correctly point toASSESSMENT_SERVICE. The configuration matches the endpoint definitions inapiConfig.tsfor assessment operations. No routing issues were found.Likely an incorrect or invalid review comment.
package.json (1)
33-33: All specified package versions are valid and exist on npm registry.The PR adds axios@1.9.0, passport@0.7.0, pg@8.16.0 and updates @nestjs/cli to @10.4.9 and @types/passport to @1.0.17. Verification confirms all versions are available:
- axios@1.9.0 ✓
- passport@0.7.0 ✓
- pg@8.16.0 ✓
- @nestjs/cli@10.4.9 ✓
- @types/passport@1.0.17 ✓
Ensure these packages are compatible with your existing @nestjs ecosystem (currently at ^10.3.x) and run
npm auditafter installation to confirm no security vulnerabilities are introduced.
| '/action/assessment/v3/items/create': createRouteObject( | ||
| // make similar changes for others | ||
| { | ||
| post: {}, | ||
| }, | ||
| '/itemset/v3/create', | ||
| '/learning-service/assessment/v3/items/create', | ||
| ), | ||
| '/action/assessment/v3/items/read/:identifier': createRouteObject( | ||
| { | ||
| get: {}, | ||
| }, | ||
| '/itemset/v3/read/:identifier', | ||
| '/learning-service/assessment/v3/items/read/:identifier', | ||
| ), | ||
| '/action/assessment/v3/items/update/:identifier': createRouteObject( | ||
| { | ||
| patch: {}, | ||
| }, | ||
| '/itemset/v3/update/:identifier', | ||
| '/learning-service/assessment/v3/items/update/:identifier', | ||
| ), | ||
| '/action/assessment/v3/items/review/:identifier': createRouteObject( | ||
| { | ||
| post: {}, | ||
| }, | ||
| '/itemset/v3/retire/:identifier', | ||
| '/learning-service/assessment/v3/items/review/:identifier', | ||
| ), | ||
| '/action/assessment/v3/items/retire/:identifier': createRouteObject( | ||
| { | ||
| delete: {}, | ||
| }, | ||
| '/itemset/v3/retire/:identifier', | ||
| '/learning-service/assessment/v3/items/retire/:identifier', | ||
| ), | ||
| '/learning-service/assessment/v3/items/create': createRouteObject( | ||
| { | ||
| post: {}, | ||
| }, | ||
| '/learning-service/assessment/itemset/v3/create', | ||
| ), | ||
|
|
||
| '/learning-service/assessment/v3/items/read/:identifier': createRouteObject( | ||
| { | ||
| get: {}, | ||
| }, | ||
| '/learning-service/assessment/itemset/v3/read/:identifier', | ||
| ), | ||
| '/learning-service/assessment/v3/items/update/:identifier': createRouteObject( | ||
| { | ||
| patch: {}, | ||
| }, | ||
| '/learning-service/assessment/itemset/v3/update/:identifier', | ||
| ), | ||
| '/learning-service/assessment/v3/items/review/:identifier': createRouteObject( | ||
| { | ||
| post: {}, | ||
| }, | ||
| '/learning-service/assessment/itemset/v3/review/:identifier', | ||
| ), | ||
| '/learning-service/assessment/v3/items/retire/:identifier': createRouteObject( | ||
| { | ||
| delete: {}, | ||
| }, | ||
| '/learning-service/assessment/itemset/v3/retire/:identifier', | ||
| ), |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
echo "=== Analyzing /action/assessment routes and their redirects ==="
rg -n "'/action/assessment" src/common/middleware/apiConfig.ts -A 5 | head -60
echo ""
echo "=== Analyzing /learning-service/assessment/v3/items routes and their final redirects ==="
rg -n "'/learning-service/assessment/v3/items" src/common/middleware/apiConfig.ts -A 5 | head -60
echo ""
echo "=== Checking for the TODO comment and surrounding context ==="
rg -n "make similar changes" src/common/middleware/apiConfig.ts -B 2 -A 2
echo ""
echo "=== Counting assessment route configurations ==="
echo "Number of /action/assessment routes:"
rg -c "'/action/assessment" src/common/middleware/apiConfig.ts
echo "Number of /learning-service/assessment/v3/items routes:"
rg -c "'/learning-service/assessment/v3/items" src/common/middleware/apiConfig.tsRepository: tekdi/shiksha-middleware
Length of output: 1481
🏁 Script executed:
#!/bin/bash
echo "=== Full assessment routes section (lines 1559-1620) ==="
sed -n '1559,1620p' src/common/middleware/apiConfig.ts
echo ""
echo "=== Checking if there are ANY /learning-service/assessment routes anywhere ==="
rg "/learning-service/assessment" src/common/middleware/apiConfig.ts | head -20
echo ""
echo "=== Searching for 'make similar' comment elsewhere in file ==="
rg -i "make similar|todo|incomplete" src/common/middleware/apiConfig.ts
echo ""
echo "=== Context around line 1581 to verify review vs retire routing ==="
sed -n '1577,1582p' src/common/middleware/apiConfig.tsRepository: tekdi/shiksha-middleware
Length of output: 2141
Fix endpoint routing mismatch for review operation.
Line 1579 routes /action/assessment/v3/items/review/:identifier to /itemset/v3/retire/:identifier, which is incorrect. The review operation should route to a review endpoint, not retire. Verify the correct target endpoint and update accordingly.
🤖 Prompt for AI Agents
In src/common/middleware/apiConfig.ts around lines 1559 to 1620, the route
mapping for '/action/assessment/v3/items/review/:identifier' incorrectly points
to a retire endpoint; update the target path to the corresponding review
endpoint (e.g., change
'/learning-service/assessment/itemset/v3/retire/:identifier' to
'/learning-service/assessment/itemset/v3/review/:identifier' or the correct
review path in your API), and mirror the same fix for the duplicate
learning-service mapping so both review routes point to the proper review
target.
| // custom jwt.strategy will get executed | ||
| await guard.canActivate(context); | ||
| //await guard.canActivate(context); | ||
| } | ||
| //check for academic year |
There was a problem hiding this comment.
CRITICAL: JWT authentication completely bypassed.
The JwtAuthGuard is instantiated without parameters and the canActivate() call is commented out, effectively disabling authentication for all non-public APIs. This creates a critical security vulnerability allowing unauthorized access to protected endpoints.
Apply this diff to restore authentication:
- const guard = new JwtAuthGuard();
+ const guard = new JwtAuthGuard(this.reflector);
// custom jwt.strategy will get executed
- //await guard.canActivate(context);
+ await guard.canActivate(context);Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/common/middleware/middleware.service.ts around lines 60-62, restore JWT
authentication by removing the manual no-arg instantiation that bypasses DI and
re-enabling the guard check: obtain the JwtAuthGuard via dependency injection
(inject it into the service or retrieve it from ModuleRef) instead of `new
JwtAuthGuard()`, then call and await `guard.canActivate(context)` (uncomment the
call) and act on its boolean result (throw/deny when false). Ensure the guard is
constructed with its required dependencies (e.g. Reflector, AuthService) through
DI so the custom jwt.strategy runs correctly.
| "basePackageName": "ecml-cms", | ||
| "packageName": "shiksha-ecml-cms" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "sourceRoute": "/interface/v1/learning-service/assessment/v3/items/create", | ||
| "type": "POST", | ||
| "priority": "MUST_HAVE", | ||
| "inSequence": false, | ||
| "orchestrated": false, | ||
| "targetPackages": [ | ||
| { | ||
| "basePackageName": "ecml-cms", | ||
| "packageName": "shiksha-ecml-cms" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "sourceRoute": "/interface/v1/learning-service/assessment/v3/items/read/:identifier", | ||
| "type": "GET", | ||
| "priority": "MUST_HAVE", | ||
| "inSequence": false, | ||
| "orchestrated": false, | ||
| "targetPackages": [ | ||
| { | ||
| "basePackageName": "ecml-cms", | ||
| "packageName": "shiksha-ecml-cms" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "sourceRoute": "/interface/v1/learning-service/assessment/v3/items/update/:identifier", | ||
| "type": "PATCH", | ||
| "priority": "MUST_HAVE", | ||
| "inSequence": false, | ||
| "orchestrated": false, | ||
| "targetPackages": [ | ||
| { | ||
| "basePackageName": "ecml-cms", | ||
| "packageName": "shiksha-ecml-cms" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "sourceRoute": "/interface/v1/learning-service/assessment/v3/items/review/:identifier", | ||
| "type": "POST", | ||
| "priority": "MUST_HAVE", | ||
| "inSequence": false, | ||
| "orchestrated": false, | ||
| "targetPackages": [ | ||
| { | ||
| "basePackageName": "ecml-cms", | ||
| "packageName": "shiksha-ecml-cms" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "sourceRoute": "/interface/v1/learning-service/assessment/v3/items/retire/:identifier", | ||
| "type": "DELETE", | ||
| "priority": "MUST_HAVE", | ||
| "inSequence": false, | ||
| "orchestrated": false, | ||
| "targetPackages": [ | ||
| { | ||
| "basePackageName": "ecml-cms", | ||
| "packageName": "shiksha-ecml-cms" | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Fix syntax errors in new route definitions.
Static analysis reports parse errors in the newly added route entries. The JSON structure appears malformed around the new learning-service/assessment routes.
Verify the JSON structure is valid. The issue appears to be around lines 1562-1563 and 1564-1576 where there may be incorrect closing brackets or missing commas. Run the following to validate:
#!/bin/bash
# Validate JSON syntax in routeConfig.js
echo "Validating JSON structure..."
node -e "
const fs = require('fs');
try {
const content = fs.readFileSync('src/constant/routeConfig.js', 'utf8');
const jsonMatch = content.match(/\{[\s\S]*\}/);
if (jsonMatch) {
JSON.parse(jsonMatch[0]);
console.log('JSON is valid');
} else {
console.log('Could not extract JSON from file');
}
} catch (err) {
console.error('JSON parse error:', err.message);
}
"
echo ""
echo "Checking for common JSON issues around new routes..."
sed -n '1559,1628p' src/constant/routeConfig.js | grep -n -E "(,$|^\s*}|^\s*\])"🧰 Tools
🪛 Biome (2.1.2)
[error] 1559-1559: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1562-1562: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1563-1563: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1565-1565: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1572-1572: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1575-1575: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1576-1576: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1578-1578: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1585-1585: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1588-1588: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1589-1589: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1591-1591: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1598-1598: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1601-1601: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1602-1602: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1604-1604: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1611-1611: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1614-1614: Expected a statement but instead found ']'.
Expected a statement here.
(parse)
[error] 1615-1615: Expected a statement but instead found ','.
Expected a statement here.
(parse)
[error] 1617-1617: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1624-1624: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 1627-1627: Expected a statement but instead found ']'.
Expected a statement here.
(parse)


No description provided.