Skip to content

Commit

Permalink
Merge pull request #45 from theburyat/feat/extend-get-user
Browse files Browse the repository at this point in the history
feat: extend get-user result with provider
  • Loading branch information
yamaritta authored Aug 15, 2024
2 parents 5431566 + 1dd3311 commit effcce8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Casdoor.Client/CasdoorClient.UserApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ public partial class CasdoorClient
return result.DeserializeData<CasdoorUser?>();
}

public virtual async Task<CasdoorUser?> GetUserByIdAsync(string id, string? owner = null, CancellationToken cancellationToken = default)
public virtual async Task<CasdoorUser?> GetUserByIdAsync(string id, string? owner = null, bool fillUserIdProvider = false, CancellationToken cancellationToken = default)
{
var queryMap = new QueryMapBuilder()
.Add("userId", id)
.Add("owner", owner ?? _options.OrganizationName)
.Add("fillUserIdProvider", fillUserIdProvider ? "true" : "false")
.QueryMap;
string url = _options.GetActionUrl("get-user", queryMap);
var result = await GetFromJsonAsync<CasdoorResponse?>(url, cancellationToken: cancellationToken);
Expand Down

0 comments on commit effcce8

Please sign in to comment.