[Fencommits] fenserve: add /dump, which gives the state using plain Haskell 'show'

Benja Fallenstein benja.fallenstein at gmail.com
Tue May 1 19:50:21 EEST 2007


Tue May  1 19:50:12 EEST 2007  Benja Fallenstein <benja.fallenstein at gmail.com>
  * add /dump, which gives the state using plain Haskell 'show'
diff -rN -u old-fenserve/notetaker/Main.hs new-fenserve/notetaker/Main.hs
--- old-fenserve/notetaker/Main.hs	2007-05-01 19:50:21.000000000 +0300
+++ new-fenserve/notetaker/Main.hs	2007-05-01 19:50:21.000000000 +0300
@@ -223,10 +223,11 @@
 
 main = stdHTTP [ debugFilter
                , h ["log"] GET  $ ok $ \() nick -> renderLog nick False
-               , h ["lastlog"] GET  $ ok $ \() nick -> renderLog nick True
+               , h ["lastlog"] GET $ ok $ \() nick -> renderLog nick True
                , h (Prefix ["export"]) GET $ ok $ \[p] () -> do
                      lines <- get; let (Note _ _ notes) = executeAll lines
                      respond $ "<pre>" ++ export (readPath p) notes
+               , h ["dump"] GET $ ok $ \() () -> get >>= respond . show
                , h [""]    GET  $ ok $ \() nick -> page [] nick
                , h ()      POST $ ok $ \() (nick,line) -> do
                      if line == ":ll" then




More information about the Fencommits mailing list