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

/v1/search endpoint handle's TLDs inconsistently. #847

Closed
fiatexodus opened this issue Aug 21, 2018 · 7 comments
Closed

/v1/search endpoint handle's TLDs inconsistently. #847

fiatexodus opened this issue Aug 21, 2018 · 7 comments

Comments

@fiatexodus
Copy link

If I search the /v1/search endpoint for a fully qualified ID featuring the '.id' TLD, the search will fail--for instance try these searches:

If I strip the '.id' TLD from those searches, the endpoint returns results:

However when I search for a fully qualified ID featuring any other TLD that doesn't end in '.id' (e.g. '.id.blockstack'), the endpoint does return results:

@jcnelson
Copy link
Member

cc @kantai

@kantai kantai self-assigned this Aug 22, 2018
@kantai
Copy link
Member

kantai commented Aug 22, 2018

Okay -- will update.

The behavior will be:

if (isNotFullyQualified(name)) {
   try `${name}.id`
} else {
   try name
}

@kantai kantai added this to In progress in Developer Platform Issues Aug 22, 2018
@jcnelson
Copy link
Member

Thanks @kantai!

@fiatexodus
Copy link
Author

Thank you both @kantai & @jcnelson. 👍

@kantai
Copy link
Member

kantai commented Aug 22, 2018

This behavior should be better now -- try these examples:

https://core.blockstack.org/v1/search?query=alexc.id
https://core.blockstack.org/v1/search?query=judecn.id
https://core.blockstack.org/v1/search?query=aaron.id

Update:

Hold that thought. A little more complexity is required here!

@kantai
Copy link
Member

kantai commented Aug 23, 2018

Merged to master in #850 -- and live now. Those above queries should work. The additional complexity came because we wanted to keep the username field unchanged from prior behavior, otherwise this change would have been backward-incompatible.

@fiatexodus
Copy link
Author

fiatexodus commented Aug 23, 2018

Great fix @kantai. I've tested it with the names you provided above along with some others (prabhaav.stealthy, prabhaav.stealthy.id, pie_head, pie_head.id, pie_head.id.block, pie_head.id.blockstack) and it's working. Thanks 👍

Edit: I believe you can close this issue unless you have other related changes you're making.

@kantai kantai closed this as completed Aug 23, 2018
@kantai kantai moved this from In progress to Shipped in Developer Platform Issues Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

3 participants