Skip to content

Conversation

@oilagh
Copy link
Contributor

@oilagh oilagh commented Jan 17, 2026

Description

Setup GET endpoint for /requests/:id

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • [ X ] New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (code improvement without changing functionality)
  • Documentation update
  • Configuration/infrastructure change
  • Performance improvement
  • [ X ] Test coverage improvement

Related Issue(s)

Closes #47
Related to #47

What Changed?

  • Add the GET requests/:id endpoint

Testing & Validation

How to Test

  1. Created a mock
  2. Tested different response status

Test Coverage

  • [ X ] Unit tests added/updated
  • Integration tests added/updated
  • Manual testing completed
  • Edge cases considered and tested

Screenshots/Recordings

Unfinished Work & Known Issues

  • [ X ] None, this PR is complete and production-ready
  • The following items are intentionally deferred:



Notes & Nuances



Deployment Considerations

  • [ X ] No special deployment considerations
  • Database migrations required (see backend/supabase/migrations/)
  • Environment variables added/changed (document in PR or update .env.example)
  • Breaking API changes (requires client updates)

Pre-Merge Checklist

Code Quality

  • Code follows the project's style guidelines and conventions
  • Self-review completed (I've reviewed my own code for obvious issues)
  • No debugging code, console logs, or commented-out code left behind
  • No merge conflicts with the base branch
  • Meaningful commit messages that explain the "why"

Testing & CI

  • All CI checks are passing
  • All new and existing tests pass locally
  • Test coverage hasn't decreased (or decrease is justified)
  • Linting passes without errors

Documentation

  • Code is self-documenting or includes helpful comments for complex logic
  • API documentation updated (if backend endpoints changed)
  • Type definitions are accurate and up-to-date

Security & Performance

  • No sensitive data (passwords, tokens, API keys, PII, etc.) committed
  • Security implications considered and addressed
  • Performance impact evaluated (no obvious performance regressions)

Reviewer Notes

Areas needing extra attention:

  • Questions for reviewers: ...

  • Concerns: ...

return errs.BadRequest("request id is not a valid UUID")
}
// add some parsing into UUID type?
dev, err := r.RequestRepository.GetRequest(c.Context(), id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the repo level, you'd wanna name it
FindRequest

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also good point, I think it would be good to have validUUID return the uuid, err itself in the check, I can do this cleanup in a separate pr

return req, nil
}

func (r *RequestsRepository) GetRequest(ctx context.Context, id string) (*models.Request, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FindRequest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@oilagh oilagh merged commit c803100 into main Jan 24, 2026
6 checks passed
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.

/GET requests/id

3 participants