Skip to content

refactor(api): extract cache-control header builder into utility function#3351

Merged
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
lokeshkumar69:refactor/cache-control-utility
Jun 3, 2026
Merged

refactor(api): extract cache-control header builder into utility function#3351
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
lokeshkumar69:refactor/cache-control-utility

Conversation

@lokeshkumar69
Copy link
Copy Markdown
Contributor

@lokeshkumar69 lokeshkumar69 commented Jun 3, 2026

Description

Closes #321

Extract inline Cache-Control header strings from app/api/streak/route.ts and app/api/github/route.ts into a shared utility function buildCacheControlHeader in utils/cacheControl.ts.

Pillar

♻️ Code Quality / Refactor

Checklist

  • I have read CONTRIBUTING.md
  • My code follows the project's code style
  • I have added unit tests for all branches
  • All existing tests pass (2543 tests ✅)
  • No breaking changes introduced

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 3, 2026

@lokeshkumar69 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the needs-details This PR is missing required description details. label Jun 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

👋 Hey @lokeshkumar69, it looks like you didn't use our PR template!

The section ## Description is missing from your PR description.

Please update your PR description to include all required sections so we can review this properly:

  • ## Description — What does this PR do? Which issue does it fix?
  • ## Pillar — Which contribution pillar does this fall under?
  • ## Checklist — Have you ticked off the quality checklist?

You can find the full template in CONTRIBUTING.md. Just edit your PR description and the needs-details label will be removed automatically. 🙌

@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jun 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

🚨 Hey @lokeshkumar69, the CI Pipeline is failing on this PR and it has been marked as status:blocked.

Please fix the issues before this can be reviewed. Here's how:

1. Run checks locally before pushing:

npm run format:check   # Check Prettier formatting
npm run lint           # Run ESLint
npm run typecheck      # TypeScript type check
npm run test           # Run unit tests (Vitest)
npm run build          # Verify production build passes

2. Auto-fix common issues:

npm run format         # Auto-fix formatting with Prettier
npm run lint -- --fix  # Auto-fix lint errors where possible

3. Check the full failure log here:
👉 View CI Run

Once you push a fix and the CI passes, the status:blocked label will be removed automatically. 💪

@github-actions github-actions Bot removed the needs-details This PR is missing required description details. label Jun 3, 2026
@github-actions github-actions Bot removed the status:blocked This PR is blocked due to a failing CI check. label Jun 3, 2026
@Aamod007 Aamod007 added GSSoC 2026 mentor:Aamod007 type:refactor Code changes that neither fix a bug nor add a feature level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Jun 3, 2026
@JhaSourav07 JhaSourav07 added level:intermediate Moderate complexity tasks quality:exceptional Outstanding contribution with exceptional implementation quality, testing. gssoc:approved PR has been reviewed and accepted for valid contribution points and removed level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Jun 3, 2026
@JhaSourav07 JhaSourav07 merged commit d2a6c6d into JhaSourav07:main Jun 3, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points GSSoC 2026 level:intermediate Moderate complexity tasks mentor:Aamod007 quality:exceptional Outstanding contribution with exceptional implementation quality, testing. type:refactor Code changes that neither fix a bug nor add a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(api): extract cache-control header builder into a utility function

3 participants