about summary refs log tree commit diff
path: root/services/tazblog/src/Server.hs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-22T17·58+0100
committerVincent Ambo <tazjin@google.com>2019-08-22T17·58+0100
commitbd47122afb7d3da60ff61f6ca74994a133cc7a0c (patch)
tree2ffc76c71d79da5511521793faa193bcd4fd2168 /services/tazblog/src/Server.hs
parentc5ef3e01b27b220d6b8c2b16584e752c69966e3d (diff)
chore(blog): Minor changes to integrate DNS based backend r/51
Diffstat (limited to 'services/tazblog/src/Server.hs')
-rw-r--r--services/tazblog/src/Server.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/tazblog/src/Server.hs b/services/tazblog/src/Server.hs
index 4be76052beeb..8a7384ccca3e 100644
--- a/services/tazblog/src/Server.hs
+++ b/services/tazblog/src/Server.hs
@@ -21,7 +21,7 @@ instance FromReqURI BlogLang where
       "en" -> Just EN
       _    -> Nothing
 
-pageSize :: Integer
+pageSize :: Int
 pageSize = 3
 
 tmpPolicy :: BodyPolicy
@@ -68,12 +68,12 @@ tryEntry (Just entry) _ = ok $ toResponse $ blogTemplate eLang eTitle $ renderEn
         eTitle = T.append ": " (title entry)
         eLang = lang entry
 
-offset :: Maybe Integer -> Integer
+offset :: Maybe Int -> Int
 offset = maybe 0 ((*) pageSize)
 
 showIndex :: BlogCache -> BlogLang -> ServerPart Response
 showIndex cache lang = do
-    (page :: Maybe Integer) <- optional $ lookRead "page"
+    (page :: Maybe Int) <- optional $ lookRead "page"
     entries <- listEntries cache (offset page) pageSize
     ok $ toResponse $ blogTemplate lang "" $
         renderEntries entries (Just $ showLinks page lang)