fix(elm): Use relative URL to access API

Now that Hunchentoot is serving the Elm frontend, Elm needs to connect
to Gemma at a relative path.

Side note: It would be useful if the frontend displayed errors that
happened :sun:
This commit is contained in:
Vincent Ambo 2017-12-31 17:02:13 +01:00
parent bd3b2782b9
commit 48687f77d2

View file

@ -64,7 +64,7 @@ loadTasks : Cmd Msg
loadTasks =
let
request =
Http.get "http://localhost:4242/tasks" (list decodeTask)
Http.get "/tasks" (list decodeTask)
in
Http.send NewTasks request
@ -75,7 +75,7 @@ completeTask task =
request =
Http.getString
(String.concat
[ "http://localhost:4242/complete?task="
[ "/complete?task="
, task.name
]
)