chore: remove unused imports in API routes#358
Conversation
Removed genuinely unused imports from API route files. Each import was verified not to be referenced anywhere in the file before removal.
|
Someone is attempting to deploy a commit to the Darshan Rajput's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for the contribution. For future contributions, please follow the project's contribution workflow: Open an issue first and clearly describe the problem, improvement, or feature you would like to work on. This helps avoid duplicate work and ensures that contributions align with the project's roadmap before development begins. Since this PR was opened without a prior assigned issue, please open an issue first for discussion next time. Thank you for your interest in contributing. |
|
Acknowledged on the issue-first workflow — got it for future contributions. The change in this PR is small (template / metadata / unused-import cleanup) and the docs pattern followed what the README already had, but I should have opened an issue first to align with your contribution policy. I'll do that going forward. If you'd like, I can close this PR and re-open it against a tracking issue — let me know. |
Summary
Problem
API route files contained imports that were declared but never used. These create unnecessary code smell and increase cognitive load during code review.
Evidence
Each import was verified to be unused via grep search:
upstashLimitimported but never referenced in quiz category routesgetClientIPimported but never referenced in quiz category routesPrismaClientimported but never referenced in search-analytics routeSolution
Removed only the imports that were confirmed to have zero references in their respective files:
app/api/quiz/[quizId]/questions/route.tsupstashLimit,getClientIPapp/api/quiz/categories/route.tsupstashLimit,getClientIPapp/api/quiz/categories/[categorySlug]/route.tsupstashLimit,getClientIPapp/api/search-analytics/route.tsPrismaClientTests / Validation
Risk / Compatibility
Minimal — removes unused declarations only, no runtime behavior changes.
Notes for maintainers