mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 06:05:31 +03:00
Remove old invocation of port://env.
This commit is contained in:
parent
6c2524e72a
commit
de2650e357
@ -1,6 +1,7 @@
|
||||
module Page.Index exposing (Data, Model, Msg, page)
|
||||
|
||||
import DataSource exposing (DataSource)
|
||||
import DataSource.Env as Env
|
||||
import DataSource.Http
|
||||
import Head
|
||||
import Head.Seo as Seo
|
||||
@ -49,20 +50,7 @@ data =
|
||||
(Decode.list (Decode.field "name" Decode.string))
|
||||
)
|
||||
)
|
||||
(env "HELLO")
|
||||
|
||||
|
||||
env : String -> DataSource.DataSource (Maybe String)
|
||||
env envVariableName =
|
||||
DataSource.Http.request
|
||||
{ url = "port://env"
|
||||
, method = "GET"
|
||||
, headers = []
|
||||
, body = DataSource.Http.jsonBody (Json.Encode.string envVariableName)
|
||||
}
|
||||
(Decode.nullable Decode.string
|
||||
|> DataSource.Http.expectJson
|
||||
)
|
||||
(Env.get "HELLO")
|
||||
|
||||
|
||||
head :
|
||||
|
Loading…
Reference in New Issue
Block a user