Skip to content

Commit

Permalink
refactor GraderUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-jmattson committed Oct 28, 2021
1 parent 8d3bc03 commit f614b9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/TopoMojo.Api/Features/Gamespace/GamespaceController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ public async Task<ActionResult<GameState>> RegisterGamespace([FromBody] Gamespac
() => _svc.HasValidUserScope(model.ResourceId, Actor.Scope, Actor.Id).Result
);

if (string.IsNullOrEmpty(model.GraderEndpoint))
if (string.IsNullOrEmpty(model.GraderUrl))
{
model.GraderEndpoint = string.Format(
model.GraderUrl = string.Format(
"{0}://{1}{2}",
Request.Scheme,
Request.Host,
Expand Down
2 changes: 1 addition & 1 deletion src/TopoMojo.Api/Features/Gamespace/GamespaceModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class GamespaceRegistration
{
public string ResourceId { get; set; }
public string GraderKey { get; set; }
public string GraderEndpoint { get; set; }
public string GraderUrl { get; set; }
public int Variant { get; set; }
public int PlayerCount { get; set; }
public int MaxAttempts { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/TopoMojo.Api/Features/Gamespace/GamespaceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ private string ResolveRandom(string key, RegistrationContext ctx)
break;

case "grader_url":
result = ctx.Request.GraderEndpoint;
result = ctx.Request.GraderUrl;
break;

case "uid":
Expand Down

0 comments on commit f614b9a

Please sign in to comment.