summaryrefslogtreecommitdiffstats
path: root/src/Config.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Config.elm')
-rw-r--r--src/Config.elm6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Config.elm b/src/Config.elm
index c3df2b0..ecd263b 100644
--- a/src/Config.elm
+++ b/src/Config.elm
@@ -9,6 +9,7 @@ baseUrl =
type ApiResource
= ApiPosts
| ApiLikePost String
+ | ApiCompose
makeApiUrl : ApiResource -> String
@@ -16,8 +17,11 @@ makeApiUrl res =
String.replace "{baseUrl}" baseUrl <|
case res of
ApiPosts ->
- "{baseUrl}/posts"
+ "{baseUrl}/posts?_sort=createdAt&_order=desc"
ApiLikePost postId ->
"{baseUrl}/posts/{postId}"
|> String.replace "{postId}" postId
+
+ ApiCompose ->
+ "{baseUrl}/posts"