Skip to content

feat(backend): add routes-f get-by-id endpoint #297#314

Open
CMI-James wants to merge 10 commits intoStreamFi-x:mainfrom
CMI-James-OD:feat/routes-f-get-by-id-297
Open

feat(backend): add routes-f get-by-id endpoint #297#314
CMI-James wants to merge 10 commits intoStreamFi-x:mainfrom
CMI-James-OD:feat/routes-f-get-by-id-297

Conversation

@CMI-James
Copy link
Collaborator

Description

Closes #297

Changes proposed

What were you told to do?

Backend: Add routes-f get-by-id endpoint #297

What did you do?

  • Created a new API route app/api/routes-f/items/[id]/route.ts to handle fetching a single Routes-F item.
  • Implemented robust ID validation:
    • Returns 404 if the ID is missing.
    • Returns 400 if the ID format is invalid (non-numeric).
  • Added mock data for Routes-F items to simulate a database response.
  • Included an ETag header in the response for efficient browser/CDN caching.
  • Created comprehensive unit tests in app/api/routes-f/items/[id]/tests/route.test.ts to cover happy paths (200 OK) and error paths (400 Bad Request, 404 Not Found).

Check List (Check all the applicable boxes)

🚨Please review the contribution guideline for this repository.

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.
  • I am making a pull request against the main branch (left side).
  • My commit messages styles matches our requested structure.
  • My code additions will fail neither code linting checks nor unit test.
  • I am only making changes to files I was requested to.

Screenshots/Videos

N/A (Backend API implementation verified via unit tests).

@vercel
Copy link

vercel bot commented Feb 24, 2026

@CMI-James is attempting to deploy a commit to the david's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link

netlify bot commented Feb 24, 2026

👷 Deploy request for streamfi pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 520d25b

@davedumto
Copy link
Contributor

hey @CMI-James fix failing ci

@davedumto
Copy link
Contributor

hi @CMI-James ci is failing

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.

2 participants