Skip to content

GET /audit-logs is unreachable: auditLogsRouter is not mounted in app.ts #648

Closed

Description

@Depo-dev

auditLogsRouter is defined in apps/backend/src/routes/auditLogs.ts but apps/backend/src/app.ts never imports or mounts it, so GET /audit-logs returns 404 on a running server. src/__tests__/auditLog.test.ts passes because it mounts the router on its own Express app.

The route also has no rate limiter and parses limit, cursor and action by hand instead of through a schema.

Fix: add app.use('/audit-logs', auditLogsRouter) in app.ts after the global_ip rate limit, add a rate limit bucket, and add a test that requests the path through app.

Found while writing #617.

Activity

  1. glendell03 commented on Oct 20, 2026

    @glendell03

    I'd like to take this one, please assign it to me.

    auditLogsRouter in apps/backend/src/routes/auditLogs.ts is never imported in apps/backend/src/app.ts, so GET /audit-logs 404s. auditLog.test.ts hides this by mounting the router on its own Express app.

    My plan:

    • Mount it with app.use('/audit-logs', auditLogsRouter) after the global_ip rate limit.
    • Add a dedicated rate limit bucket for the route.
    • Replace the hand-parsed limit, cursor and action with a schema, rejecting bad values with a 400.
    • Add a test that requests /audit-logs through app itself, so a missing mount fails.

    One question: should the new bucket reuse an existing limit config, or get its own numbers? I'd rather agree that before coding than rework it afterwards.

  2. Ikechukwu-Patrick commented on Oct 20, 2026

    @Ikechukwu-Patrick

    @Ikechukwu-Patrick has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello maintainer, please i would love to work on this issue.
    I have reviewed it, it's something i can resolve.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Ikechukwu-Patrick to this issue.

  3. iorchirmyom-afk commented on Oct 20, 2026

    @iorchirmyom-afk

    @iorchirmyom-afk has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I would love to work on this issue. Please assign 🙏

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @iorchirmyom-afk to this issue.

  4. cythecode commented on Oct 20, 2026

    @cythecode

    @cythecode has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi maintainer, I’d love to work on this issue! I've reviewed the requirements and can submit a PR shortly. Could you please assign it to me?

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @cythecode to this issue.

  5. kosisochukwu1234 commented on Oct 20, 2026

    @kosisochukwu1234

    @kosisochukwu1234 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I can work on this task, allow me to work on it, thanks

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @kosisochukwu1234 to this issue.

  6. drips-wave commented on Oct 20, 2026

    @drips-wave

    Congratulations, @kosisochukwu1234! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @kosisochukwu1234: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  7. github-actions commented on Oct 28, 2026

    @github-actions

    Closed by #694, merged into dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions