public async Task <ActionResult> Post([FromBody] RaceParameters race) { if (race == null || string.IsNullOrWhiteSpace(race.Start) || string.IsNullOrEmpty(race.End)) { return(BadRequest(new { error = "You must provide a race start and race end" })); } return(Json(await _raceAlgo.FindPath(race.Start, race.End))); }