about summary refs log tree commit diff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorVincent Ambo <viam@humac.com>2012-03-05T23·50+0100
committerVincent Ambo <viam@humac.com>2012-03-05T23·50+0100
commit0418692f07e057e2aa847fb2f5f24e6021a6073e (patch)
tree11be04de3bfd67f38326548e7b7a4e480191846c /src/Main.hs
parentf113778e17be9124615ccc1ba684cb4a832f9408 (diff)
* finished comment field
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 89f6179237f5..f3d3db32d048 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -46,6 +46,9 @@ blogHandler lang =
     msum [ path $ \(year :: Int) -> path $ \(month :: Int) -> path $ --single entry
                       \(day :: Int) -> path $ \(id_ :: String) -> showEntry year month day id_
          , path $ \(year :: Int ) -> path $ \(month :: Int) -> showMonth year month lang
+         , do
+            decodeBody tmpPolicy
+            dir "postcomment" $ path $ \(id_ :: String) -> addComment id_
          , do nullDir
               showIndex lang
          ]
@@ -84,6 +87,9 @@ showMonth y m lang = do
     startkey = JSArray [toJSON y, toJSON m]
     endkey = JSArray [toJSON y, toJSON m, JSObject (toJSObject [] )]
 
+addComment :: String -> ServerPart Response
+addComment id_ = undefined
+
 -- http://tazj.in/2012/02/10.155234
 
 -- CouchDB functions