Skip to content

Fix missing const declaration in adminRoutes.js causing server crash - #21

Merged
udaycodespace merged 2 commits into
udaycodespace:mainfrom
teja-311:fix/admin-routes-syntax-error
Jul 19, 2026
Merged

Fix missing const declaration in adminRoutes.js causing server crash#21
udaycodespace merged 2 commits into
udaycodespace:mainfrom
teja-311:fix/admin-routes-syntax-error

Conversation

@teja-311

Copy link
Copy Markdown
Contributor

Description

Fixed a syntax error in backend/routers/adminRoutes.js that crashed the server on startup. The import for getActivityLogsController was missing its opening const { declaration, causing an Unexpected token '}' error. Added the missing declaration so both controller imports are properly separated. Verified the server starts cleanly and connects to MongoDB.

Closes #20

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings or console errors.
  • I have tested my changes locally and verified they work as expected.
  • Any dependent changes have been merged and published in downstream modules.

Signed-off-by: Tejashwini <deviteja76@gmail.com>
@udaycodespace
udaycodespace self-requested a review July 19, 2026 13:20
@udaycodespace udaycodespace added ECSoC26 Required label for a PR to be eligible for Sentinel scoring ECSoC26-L1 Easy difficulty, auto-assigned by Sentinel — 5 points good-issue PA-awarded bonus for a well-written, well-scoped issue — +10 XP bug Something broken or not working as described and removed frontend backend labels Jul 19, 2026
@udaycodespace

Copy link
Copy Markdown
Owner

Description

Fixed a syntax error in backend/routers/adminRoutes.js that crashed the server on startup. The import for getActivityLogsController was missing its opening const { declaration, causing an Unexpected token '}' error. Added the missing declaration so both controller imports are properly separated. Verified the server starts cleanly and connects to MongoDB.

Closes #20

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings or console errors.
  • I have tested my changes locally and verified they work as expected.
  • Any dependent changes have been merged and published in downstream modules.

Thanks for the fix! The syntax correction in adminRoutes.js looks good and the PR description is clear.

However, I noticed this PR also includes changes to frontend/package-lock.json, which appear unrelated to the reported issue.

Please remove the unrelated changes so the PR stays focused on a single bug fix. Once the diff only contains the required fix, I'll be happy to review it again.

@udaycodespace udaycodespace added the redo Reviewed — needs changes before it can be merged label Jul 19, 2026
Comment thread frontend/package-lock.json
Comment thread backend/routers/adminRoutes.js
Signed-off-by: Tejashwini <deviteja76@gmail.com>
@udaycodespace
udaycodespace self-requested a review July 19, 2026 17:50
@udaycodespace
udaycodespace merged commit 2dcf3b0 into udaycodespace:main Jul 19, 2026
3 checks passed
@ecsoc-sentinel ecsoc-sentinel Bot added ECSoC26-L1 Easy difficulty, auto-assigned by Sentinel — 5 points and removed ECSoC26-L1 Easy difficulty, auto-assigned by Sentinel — 5 points labels Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something broken or not working as described ECSoC26-L1 Easy difficulty, auto-assigned by Sentinel — 5 points ECSoC26 Required label for a PR to be eligible for Sentinel scoring good-issue PA-awarded bonus for a well-written, well-scoped issue — +10 XP redo Reviewed — needs changes before it can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing destructuring declaration in adminRoutes.js causes server crash

2 participants