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

Incorrect work of RetrieveDNSRecordsWithTypeAndName method #6

Closed
nurlan74 opened this issue Jan 5, 2020 · 2 comments
Closed

Incorrect work of RetrieveDNSRecordsWithTypeAndName method #6

nurlan74 opened this issue Jan 5, 2020 · 2 comments

Comments

@nurlan74
Copy link

nurlan74 commented Jan 5, 2020

Hi, seems your code has a bug in the RetrieveDNSRecordsWithTypeAndName method, you double checking the "name" parameter for null value and the second condition will never be running as expected:
if (Name != null)
{
if (Name != null)
urlPath = $"domains/{domain}/records/{Type}";
else
urlPath = $"domains/{domain}/records/{Type}/{Name}";
}

I think the code should be something like that:
if (string.IsNullOrEmpty(Name))
urlPath = $"domains/{domain}/records/{Type}";
else
urlPath = $"domains/{domain}/records/{Type}/{Name}";

@vip30
Copy link
Collaborator

vip30 commented Jan 6, 2020

Thanks for your report, I guess it is possibly because copy and paste

Will update it later

@vip30
Copy link
Collaborator

vip30 commented Jan 13, 2020

Updated

@vip30 vip30 closed this as completed Jan 13, 2020
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

No branches or pull requests

2 participants