Bug Description
backend/controllers/bulkPredictController.js exports downloadBulkPredictTemplate, which generates a downloadable bulk_predict_template.csv. The only route wired to this controller is GET /bulk-predict/template in backend/routes/bulkPredict.js. That router file is never require'd or app.use()'d in backend/server.js, so the template-download feature has no live endpoint. The working bulk-upload flow users actually hit (POST /bulk-predict) lives in a different, already-mounted file (predictionRoutes.js), which has no equivalent template route — so there is currently no way to reach the template download at all.
Unmounted router: backend/routes/bulkPredict.js (entire file, L1–L29)
Dead controller export: backend/controllers/bulkPredictController.js (downloadBulkPredictTemplate, ~L150)
Confirmed missing from app: backend/server.js — no require('./routes/bulkPredict') anywhere, unlike predictionRoutes, emailIntegrationRoutes, imapRoutes, etc. (L35–L40, L263–L266)
The route that is live: backend/routes/predictionRoutes.js L520 (POST /bulk-predict), L609 (POST /bulk-predict/export) — no GET /bulk-predict/template here
Steps to Reproduce
- Confirm the router is never referenced in the app entrypoint:
grep -n "bulkPredict" backend/server.js
# (no output)
- Start the backend and request the template endpoint:
curl -i http://localhost:5000/bulk-predict/template
curl -i http://localhost:5000/api/bulk-predict/template
- Compare with the actually-registered bulk endpoints from
predictionRoutes.js, which do respond:
curl -i -X POST http://localhost:5000/bulk-predict -F "file=@test.csv"
Expected Behavior
GET /bulk-predict/template should return a downloadable CSV (Content-Disposition: attachment; filename="bulk_predict_template.csv") with the sample text,label header, so users know the expected format before uploading a bulk file.
Actual Behavior
Both http://localhost:5000/bulk-predict/template and http://localhost:5000/api/bulk-predict/template return 404 Not Found, while POST /bulk-predict works correctly via the separately-mounted predictionRoutes.js.
Screenshots
No response
Additional Information
No response
Bug Description
backend/controllers/bulkPredictController.jsexportsdownloadBulkPredictTemplate, which generates a downloadablebulk_predict_template.csv. The only route wired to this controller isGET /bulk-predict/templateinbackend/routes/bulkPredict.js. That router file is neverrequire'd orapp.use()'d inbackend/server.js, so the template-download feature has no live endpoint. The working bulk-upload flow users actually hit (POST /bulk-predict) lives in a different, already-mounted file (predictionRoutes.js), which has no equivalent template route — so there is currently no way to reach the template download at all.Unmounted router:
backend/routes/bulkPredict.js(entire file, L1–L29)Dead controller export:
backend/controllers/bulkPredictController.js(downloadBulkPredictTemplate, ~L150)Confirmed missing from app:
backend/server.js— norequire('./routes/bulkPredict')anywhere, unlikepredictionRoutes,emailIntegrationRoutes,imapRoutes, etc. (L35–L40, L263–L266)The route that is live:
backend/routes/predictionRoutes.jsL520 (POST /bulk-predict), L609 (POST /bulk-predict/export) — noGET /bulk-predict/templatehereSteps to Reproduce
predictionRoutes.js, which do respond:curl -i -X POST http://localhost:5000/bulk-predict -F "file=@test.csv"Expected Behavior
GET /bulk-predict/templateshould return a downloadable CSV (Content-Disposition: attachment; filename="bulk_predict_template.csv") with the sampletext,labelheader, so users know the expected format before uploading a bulk file.Actual Behavior
Both
http://localhost:5000/bulk-predict/templateandhttp://localhost:5000/api/bulk-predict/templatereturn404 Not Found, whilePOST /bulk-predictworks correctly via the separately-mountedpredictionRoutes.js.Screenshots
No response
Additional Information
No response