Skip to content

Commit

Permalink
Merge pull request #783 from mikecasas/master
Browse files Browse the repository at this point in the history
Refactor to eliminate repetitive code.
  • Loading branch information
sbwalker authored Oct 7, 2020
2 parents 0a9edd8 + 7b3dfc4 commit fde43b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Oqtane.Client/Services/ServiceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,15 @@ public string CreateApiUrl(Alias alias, string serviceName)
// add entityid parameter to url for custom authorization policy
public string CreateAuthorizationPolicyUrl(string url, int entityId)
{
string qs = "entityid=" + entityId.ToString();

if (url.Contains("?"))
{
return url + "&entityid=" + entityId.ToString();
return url + "&" + qs;
}
else
{
return url + "?entityid=" + entityId.ToString();
return url + "?" + qs;
}
}

Expand Down

0 comments on commit fde43b6

Please sign in to comment.