Store the ApiUrl in the message, so that user can't change it midway.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 ())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user