Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated RecordsRead to return RecordsDelete and initial RecordsWrite when record is deleted #814

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

thehenrytsai
Copy link
Contributor

Prior to this change, a 404 status is returned without any data when a RecordsRead is performed against a deleted record.

But 404 status alone prevents a the RecordsDelete from being imported into the caller's DWN for the purpose updating the record's state.

This PR updated RecordsRead to return RecordsDelete and initial RecordsWrite when record is deleted.

@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (8b6eb13) to head (fb58056).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #814   +/-   ##
=======================================
  Coverage   98.71%   98.72%           
=======================================
  Files          74       74           
  Lines       11469    11508   +39     
  Branches     1652     1661    +9     
=======================================
+ Hits        11322    11361   +39     
  Misses        141      141           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

csuwildcat
csuwildcat previously approved these changes Oct 3, 2024
LiranCohen
LiranCohen previously approved these changes Oct 4, 2024
Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

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

🥇 🐐 This is definitely needed!

src/handlers/records-read.ts Outdated Show resolved Hide resolved
src/types/records-types.ts Show resolved Hide resolved
@thehenrytsai thehenrytsai dismissed stale reviews from LiranCohen and csuwildcat via 6276e5e October 4, 2024 21:48
Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

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

🎸 🐐

@thehenrytsai thehenrytsai merged commit d667090 into main Oct 4, 2024
4 checks passed
@thehenrytsai thehenrytsai deleted the henrytsai/records-read-returning-delete branch October 4, 2024 22:15
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.

4 participants