Skip to content

feat: treat request update as patch input#285

Open
eric-kitagawa wants to merge 4 commits intomainfrom
eric/patch-requests
Open

feat: treat request update as patch input#285
eric-kitagawa wants to merge 4 commits intomainfrom
eric/patch-requests

Conversation

@eric-kitagawa
Copy link
Copy Markdown
Contributor

@eric-kitagawa eric-kitagawa commented Apr 4, 2026

Refactored the update request endpoint to support accepting partial inputs

@tGiech22
Copy link
Copy Markdown

tGiech22 commented Apr 7, 2026

Hi Pookie :D

@eric-kitagawa eric-kitagawa marked this pull request as ready for review April 7, 2026 19:37
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 30.30303% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.20%. Comparing base (11c9822) to head (84e9093).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
backend/internal/models/requests.go 0.00% 16 Missing ⚠️
backend/internal/utils/patch.go 0.00% 6 Missing ⚠️
backend/internal/handler/requests.go 90.90% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##            main    #285      +/-   ##
========================================
+ Coverage   1.88%   9.20%   +7.32%     
========================================
  Files         86     135      +49     
  Lines       3289    5626    +2337     
  Branches      24      24              
========================================
+ Hits          62     518     +456     
- Misses      3227    5092    +1865     
- Partials       0      16      +16     
Flag Coverage Δ
backend 19.51% <30.30%> (?)
mobile 84.00% <ø> (ø)
web 0.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
backend/internal/handler/requests.go 86.63% <90.90%> (ø)
backend/internal/utils/patch.go 0.00% <0.00%> (ø)
backend/internal/models/requests.go 0.00% <0.00%> (ø)

... and 46 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eric-kitagawa eric-kitagawa marked this pull request as draft April 7, 2026 19:39
@eric-kitagawa eric-kitagawa marked this pull request as ready for review April 7, 2026 20:22
@eric-kitagawa eric-kitagawa changed the title feat: add optional fields to update request feat: treat request update as patch input Apr 7, 2026
@eric-kitagawa eric-kitagawa self-assigned this Apr 7, 2026
@eric-kitagawa eric-kitagawa added feature Introduces a new and complete feature needs review feat(urethon) labels Apr 7, 2026
@eric-kitagawa eric-kitagawa requested a review from Dao-Ho April 7, 2026 20:33
utils.ApplyPtr(&r.CompletedAt, patch.CompletedAt)
utils.ApplyPtr(&r.Notes, patch.Notes)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thoughts on leaving this in the model? It didn't feel right to place in the handler or repo layer. My thought was since this is just a mapping function on the exact same fields as the model itself it should sit side by side with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat(urethon) feature Introduces a new and complete feature needs review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants