summaryrefslogtreecommitdiffstats
path: root/src/Config.elm
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@valuemotive.com>2021-10-30 19:24:00 +0300
committerJan Tuomi <jan.tuomi@valuemotive.com>2021-10-30 19:29:03 +0300
commitc6d55561bf8422301ea7a2d08b9a7c3e30a1440e (patch)
tree33fd6b0c1150b67e2f8ba38806a984c3cecccc75 /src/Config.elm
parente24ba80820bd49af72a9e1702ed635e9b63452d1 (diff)
Implement authentication
Diffstat (limited to 'src/Config.elm')
-rw-r--r--src/Config.elm6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Config.elm b/src/Config.elm
index ecd263b..397bc38 100644
--- a/src/Config.elm
+++ b/src/Config.elm
@@ -1,5 +1,7 @@
module Config exposing (ApiResource(..), makeApiUrl)
+import Utils exposing (templ)
+
baseUrl : String
baseUrl =
@@ -20,8 +22,8 @@ makeApiUrl res =
"{baseUrl}/posts?_sort=createdAt&_order=desc"
ApiLikePost postId ->
- "{baseUrl}/posts/{postId}"
- |> String.replace "{postId}" postId
+ "{baseUrl}/posts/{0}"
+ |> templ [ postId ]
ApiCompose ->
"{baseUrl}/posts"