Created
November 14, 2017 10:31
-
-
Save forki/90d69de794b3613f0dab5a2ab0deaba1 to your computer and use it in GitHub Desktop.
Init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let initModel user = | |
let ws = Elmish.WebSocket.createAuthenticated ("ws://localhost:8085/websocket", user.Token) | |
{ ChargingPoints = [||] | |
Reservations = Map.empty | |
WebSocket = ws | |
Connected = false | |
User = user }, | |
Cmd.batch [ | |
Cmd.ofPromise getChargingPoints () ChargingPointsLoaded Error | |
Elmish.WebSocket.Cmd.Configure ws ServerMsg | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment