fix to f# controller
This commit is contained in:
parent
6743364423
commit
14f590829c
|
|
@ -22,11 +22,11 @@ type WeatherController () =
|
||||||
inherit ControllerBase()
|
inherit ControllerBase()
|
||||||
|
|
||||||
[<HttpGet>]
|
[<HttpGet>]
|
||||||
member this.Get(location:string, unit: string) =
|
member this.Get(location:string, unit: TemperatureUnit) =
|
||||||
let rnd = System.Random()
|
let rnd = System.Random()
|
||||||
let result:WeatherResult = {
|
let result:WeatherResult = {
|
||||||
Location = location;
|
Location = location;
|
||||||
Temperature = rnd.Next(-20,55);
|
Temperature = rnd.Next(-20,55);
|
||||||
TemperatureUnit = unit
|
TemperatureUnit = unit
|
||||||
}
|
}
|
||||||
ActionResult<WeatherResult>(result)
|
ActionResult<WeatherResult>(result)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue