Store the ApiUrl in the message, so that user can't change it midway.

This commit is contained in:
2018-12-17 02:40:39 -08:00
parent 6f1e3da27b
commit 471f5b301b
3 changed files with 7 additions and 6 deletions

View File

@@ -67,7 +67,7 @@ login apiUrl username password = request
] )
, ("password", string password)
]
, expect = expectJson ReceiveLoginResponse loginResponseDecoder
, expect = expectJson (ReceiveLoginResponse apiUrl) loginResponseDecoder
, timeout = Nothing
, tracker = Nothing
}

View File

@@ -41,7 +41,7 @@ type Msg =
| ViewportChangeComplete (Result Browser.Dom.Error ()) -- We're done changing the viewport.
| ReceiveFirstSyncResponse (Result Http.Error SyncResponse) -- HTTP, Sync has finished
| ReceiveSyncResponse (Result Http.Error SyncResponse) -- HTTP, Sync has finished
| ReceiveLoginResponse (Result Http.Error LoginResponse) -- HTTP, Login has finished
| ReceiveLoginResponse ApiUrl (Result Http.Error LoginResponse) -- HTTP, Login has finished
| ReceiveUserData Username (Result Http.Error UserData)
| ReceiveCompletedReadMarker (Result Http.Error ())