Skip to content

Conversation

@IvanKolchanov
Copy link
Contributor

No description provided.

@IvanKolchanov
Copy link
Contributor Author

@marcin-krystianc the PR with fixes to #332

Consul/Agent.cs Outdated
/// <returns>Root certificates</returns>
public async Task<QueryResult<CARoots>> GetCARoots(CancellationToken ct = default)
{
return await _client.Get<CARoots>("v1/agent/connect/ca/roots", QueryOptions.Default).Execute(ct).ConfigureAwait(false);
Copy link
Contributor

@marcin-krystianc marcin-krystianc Jun 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you call the other overload to avoid repeating the implementation.

Suggested change
return await _client.Get<CARoots>("v1/agent/connect/ca/roots", QueryOptions.Default).Execute(ct).ConfigureAwait(false);
return await GetCARoots(QueryOptions.Default, ct);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, makes sense. Shouldn't it be "return await GetCARoots(QueryOptions.Default, ct).ConfigureAwait(false);" though?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, you are right.

Copy link
Contributor

@marcin-krystianc marcin-krystianc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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.

2 participants