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

IdentifierResourceEnd: rename alias, events, and delete aid #218

Merged
merged 4 commits into from
Apr 6, 2024

Conversation

rodolfomiranda
Copy link
Collaborator

@rodolfomiranda rodolfomiranda commented Mar 29, 2024

This PR modify the IdentifierResourceEnd endpoint in the following way:

  • PUT /identifiers/{name}: used to rename an alias and no longer accepts rot and ixn events
  • POST /identifiers/{name}/events: used to create rot and ixn events
  • DELETE /identifiers/{name}: used to delete an alias

related to this issue #216 , and Discord this discussion:

@rodolfomiranda rodolfomiranda marked this pull request as draft March 29, 2024 18:36
@rodolfomiranda
Copy link
Collaborator Author

still working on tests

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 93.07%. Comparing base (c38a54b) to head (0cdcc49).
Report is 1 commits behind head on development.

Files Patch % Lines
src/keria/app/aiding.py 84.84% 5 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #218      +/-   ##
===============================================
- Coverage        93.14%   93.07%   -0.08%     
===============================================
  Files               38       38              
  Lines             6943     6986      +43     
===============================================
+ Hits              6467     6502      +35     
- Misses             476      484       +8     

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

@lenkan
Copy link
Collaborator

lenkan commented Apr 4, 2024

Cross posting from signify-ts: WebOfTrust/signify-ts#241 (review)

Open question... since we are changing the API anyways. Is there currently any benefit of using the event type as an object field key rather than just relying on the event payload t property? I'll illustrate with an example what I mean:

Currently:

POST /identifiers/name/events
{
  "rot": { ...rot payload },
  "sigs": [...sigs]
}

POST /identifiers/name/events
{
  "ixn": { ...ixn payload },
  "sigs": [...sigs]
}

Rather than:

POST /identifiers/name/events
{
  "event": { t: "rot/ixn", ...rot/ixn payload },
  "sigs": [...sigs]
}

The switch on backend would be to check body.event.t === "ixn" or body.event.t === "rot".

@pfeairheller pfeairheller merged commit 5fdfebb into WebOfTrust:development Apr 6, 2024
5 checks passed
This was referenced Apr 19, 2024
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.

3 participants