Skip to content

Fix Duplicate Route Definitions Causing Unreachable Code in User and Auth Routes #8

@Advikkhandelwal

Description

@Advikkhandelwal

While going through the code, I noticed that both routes/user.js and routes/auth.js define duplicate GET / routes. Since Express always uses the first matching route, the second one never runs — which means part of the code is currently unreachable.

My plan is to:

  • Move the documentation handlers to a clear GET /docs endpoint

  • Remove the duplicate GET / routes

  • Keep all public and protected routes working as they are

  • Add simple comments to make the route structure easier to follow

This should clean up the routing logic and avoid confusion in the future.

If this sounds good, could you please assign the issue to me so I can start working on it?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions