about summary refs log tree commit diff
path: root/frontend/Main.elm
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2017-12-31T16·02+0100
committerVincent Ambo <tazjin@gmail.com>2017-12-31T16·02+0100
commit48687f77d2e838907f73e503bef709ff1fd0f51a (patch)
tree834325eac39835cd9017211047a274d3dc085bc6 /frontend/Main.elm
parentbd3b2782b938a29d6952d7a06c040e59571d825e (diff)
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:
Diffstat (limited to 'frontend/Main.elm')
-rw-r--r--frontend/Main.elm4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/Main.elm b/frontend/Main.elm
index 9f90476f62cf..e449908e499c 100644
--- a/frontend/Main.elm
+++ b/frontend/Main.elm
@@ -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
                     ]
                 )