Initial application stub

This commit is contained in:
Eike Kettner
2019-07-17 22:03:10 +02:00
commit 6154e6a387
54 changed files with 2447 additions and 0 deletions

View File

@ -0,0 +1,22 @@
module Data.Flags exposing (..)
import Api.Model.AuthResult exposing (AuthResult)
type alias Config =
{ appName: String
, baseUrl: String
}
type alias Flags =
{ account: Maybe AuthResult
, config: Config
}
getToken: Flags -> Maybe String
getToken flags =
flags.account
|> Maybe.andThen (\a -> a.token)
withAccount: Flags -> AuthResult -> Flags
withAccount flags acc =
{ flags | account = Just acc }