-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Feature add indexed recursive inscriptions endpoint #3936
base: master
Are you sure you want to change the base?
Feature add indexed recursive inscriptions endpoint #3936
Conversation
@@ -232,6 +232,10 @@ impl Server { | |||
"/r/children/:inscription_id/inscriptions", | |||
get(Self::child_inscriptions_recursive), | |||
) | |||
.route( | |||
"/r/children/:inscription_id/inscriptions/at/:index", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont need /inscriptions/
in the route it is too verbose and is plural. We are only returning a single Id here.
We should follow the format of the first child endpoint not the second one. I never got around to doing this feature on the original child endpoint I was going to but ran out of time.
- "/r/children/:inscription_id/inscriptions/at/:index",
+ "/r/children/:inscription_id/at/:index",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good.
)); | ||
assert_eq!(child_json.id, latest_child_inscription_id); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need test for /at/0
which would be the first child inscription. As well as /at/1
which is the second child. This checks the off by one error we had in the original sat endpoint PR see discussion about that here
Look at the sat endpoint for reference of /at/:index
tests:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do.
Upon further review I don't think there is any benefit of limiting ourself to using the Struct If we used |
On second thought I think we should only return the ID. |
@raphjaph can you have a look once? |
I'm a bit confused with the lack of hype for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raphjaph @casey can you have a look once and also what do you think about comments by @elocremarc? would like your inputs too before going ahead make those changes, makes sense too me. |
Fixes #3923