TBD54566975 / dwn-sdk-js

Decentralized Web Node (DWN) Reference implementation
https://identity.foundation/decentralized-web-node/spec/
Apache License 2.0
326 stars 105 forks source link

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

Closed thehenrytsai closed 1 month ago

thehenrytsai commented 1 month ago

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 commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.