Skip to content

Commit

Permalink
Fix url generation when "search" is null (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
meziantou authored Jun 24, 2021
1 parent ce179a7 commit b4d6dfe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion NGitLab/Impl/GroupsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ public IEnumerable<Group> Search(string search)

public IEnumerable<Project> SearchProjects(int groupId, string search)
{
return _api.Get().GetAll<Project>(Utils.AddOrderBy(Url + "/" + groupId + $"/projects?search={Uri.EscapeDataString(search)}"));
var url = Url + "/" + Uri.EscapeDataString(groupId.ToString(CultureInfo.InvariantCulture)) + "/projects";
url = Utils.AddParameter(url, "search", search);
url = Utils.AddOrderBy(url);
return _api.Get().GetAll<Project>(url);
}

public Group Create(GroupCreate group) => _api.Post().With(group).To<Group>(Url);
Expand Down

0 comments on commit b4d6dfe

Please sign in to comment.