* comment adding fixed

* JSON Encoding is broken in the current Hackage version of CouchDB, thus it is necessary to build it manually and to apply this fix:
fafd63a436
This commit is contained in:
"Vincent Ambo ext:(%22) 2012-03-07 13:40:47 +01:00
parent bc25b9d1e0
commit b2bb90beff
2 changed files with 11 additions and 1 deletions

View file

@ -40,6 +40,7 @@ tazBlog = do
, do dir " " $ nullDir
seeOther ("https://plus.google.com/115916629925754851590" :: String) (toResponse ())
, path $ \(id_ :: Int) -> getEntryLink id_
, path $ \(year :: Int) -> path $ \(month :: Int) -> path $ \(id_ :: String) -> formatOldLink year month id_
, dir "res" $ serveDirectory DisableBrowsing [] "../res"
, dir "notice" $ ok $ toResponse showSiteNotice
, serveDirectory DisableBrowsing [] "../res"
@ -57,6 +58,11 @@ blogHandler lang =
showIndex lang
]
formatOldLink :: Int -> Int -> String -> ServerPart Response
formatOldLink y m id_ =
flip seeOther (toResponse ()) $
concat $ intersperse' "/" ["de", show y, show m, replace '.' '/' id_]
showEntry :: BlogLang -> String -> ServerPart Response
showEntry lang id_ = do
entryJS <- liftIO $ runCouchDB' $ getDoc (db "tazblog") (doc id_)