Skip to content

chore: delete routes with no caller - #945

Merged
danieltruong merged 2 commits into
developfrom
chore-delete-dead-routes
Oct 13, 2026
Merged

danieltruong merged 2 commits into
developfrom
chore-delete-dead-routes

Conversation

@danieltruong

Copy link
Copy Markdown
Collaborator

Removes routes that no frontend or job calls, with their handlers, helpers and tests.

Removed:

  • topic and vc POST, PUT and DELETE, plus the TopicId and VcId swagger definitions
  • POST /task and api/tasks/import-task.js
  • POST /jobs and DELETE /jobs/{jobId}, plus the create-only permission helpers
  • POST /materialized-views/refresh, plus isLocked and forceRelease in runLock.js (the CronJob calls the worker directly)
  • the three inspection POST routes
  • the five staff CAC routes (public CAC sign-up and remove stay)
  • the bulk form of DELETE /recentActivity
  • GET /audit, which was never registered because its controller file does not exist

Kept: POST /login/token (eagle-admin login page calls it), topic and vc GET routes, the job queue and its GET routes, and the inspection DEMI push kinds used by the repush script and sweep.

Verified: yarn test (1584 pass; the 28 fewer tests covered deleted code). Callers checked in eagle-admin and eagle-public. Smoke tests parse but were not run against a deployment.

Wiki pages Async-Jobs, API-Architecture and Troubleshooting still mention the removed job and refresh routes and will be updated separately.

These routes have no caller in eagle-admin or eagle-public and had
no prod traffic in 30 days:
- topic and vc POST, PUT, DELETE
- POST /task and the api/tasks controller dir
- POST /jobs and DELETE /jobs/{jobId}
- POST /materialized-views/refresh (the CronJob runs
  worker/matview-worker.js directly)
- inspection POST x3
- staff CAC routes x5
- DELETE /recentActivity (bulk form, always answered 400)
- GET /audit (no controller, so it was never routed)

GET routes for topic, vc, jobs and inspection items stay, as do the
public CAC sign-up and remove routes. POST /login/token stays because
the eagle-admin login screen calls it.

BREAKING CHANGE: the routes listed above now answer 404.
@danieltruong
danieltruong merged commit b45186e into develop Oct 13, 2026
@danieltruong
danieltruong deleted the chore-delete-dead-routes branch October 13, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant