diff options
| author | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-10-30 19:24:00 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-10-30 19:29:03 +0300 |
| commit | c6d55561bf8422301ea7a2d08b9a7c3e30a1440e (patch) | |
| tree | 33fd6b0c1150b67e2f8ba38806a984c3cecccc75 /src/Config.elm | |
| parent | e24ba80820bd49af72a9e1702ed635e9b63452d1 (diff) | |
Implement authentication
Diffstat (limited to 'src/Config.elm')
| -rw-r--r-- | src/Config.elm | 6 |
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" |
