Skip to content

Commit

Permalink
Remove double initialCounter definition for remotign
Browse files Browse the repository at this point in the history
  • Loading branch information
theimowski committed May 13, 2019
1 parent 6d62fa5 commit 349e291
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Content/src/Client/Client.fs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ module Server =
|> Remoting.withRouteBuilder Route.builder
|> Remoting.buildProxy<ICounterApi>
#endif

let initialCounter = Server.api.initialCounter
#else
// Fetch a data structure from specified url and using the decoder
let fetchWithDecoder<'T> (url: string) (decoder: Decoder<'T>) (init: RequestProperties list) =
Expand All @@ -105,7 +103,9 @@ let inline fetchAs<'T> (url: string) (init: RequestProperties list) =
fetchWithDecoder url decoder init
#endif

#if (deploy == "iis" && server != "suave")
#if (remoting)
let initialCounter = Server.api.initialCounter
#elseif (deploy == "iis" && server != "suave")
let initialCounter = fetchAs<Counter> (ServerPath.normalize "/api/init")
#else
let initialCounter = fetchAs<Counter> "/api/init"
Expand Down

0 comments on commit 349e291

Please sign in to comment.