From c6d55561bf8422301ea7a2d08b9a7c3e30a1440e Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sat, 30 Oct 2021 19:24:00 +0300 Subject: Implement authentication --- src/Config.elm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Config.elm') 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" -- cgit v1.3