Begin working on Http requests.
This commit is contained in:
21
src/Scylla/Model.elm
Normal file
21
src/Scylla/Model.elm
Normal file
@@ -0,0 +1,21 @@
|
||||
module Scylla.Model exposing (..)
|
||||
import Scylla.Api exposing (..)
|
||||
import Scylla.Sync exposing (SyncResponse)
|
||||
import Scylla.Login exposing (LoginResponse)
|
||||
import Browser.Navigation as Nav
|
||||
import Browser
|
||||
import Http
|
||||
import Url exposing (Url)
|
||||
|
||||
type alias Model =
|
||||
{ key : Nav.Key
|
||||
, token : Maybe ApiToken
|
||||
, apiUrl : ApiUrl
|
||||
}
|
||||
|
||||
type Msg =
|
||||
TryUrl Browser.UrlRequest
|
||||
| ChangeUrl Url
|
||||
| ReceiveSyncResponse (Result Http.Error SyncResponse)
|
||||
| ReceiveLoginResponse (Result Http.Error LoginResponse)
|
||||
|
||||
Reference in New Issue
Block a user