about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
authorVincent Ambo <v.ambo@me.com>2012-03-13T23·37+0100
committerVincent Ambo <v.ambo@me.com>2012-03-13T23·37+0100
commite6746984f585168229d902096e22177a6e55a6c2 (patch)
tree9f04039b20801d56e0da9bf9c232fb87a4cb05d6 /tools
parentf6446aec725234ea38b5431defa8e4c987e07f20 (diff)
* changed comment structure to sort by UTCTime
* postEntry function done; adminHandler doesn't work?
Diffstat (limited to 'tools')
-rw-r--r--tools/acid-migrate/Acid.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/acid-migrate/Acid.hs b/tools/acid-migrate/Acid.hs
index 276102eb030b..10ab3e23d0a0 100644
--- a/tools/acid-migrate/Acid.hs
+++ b/tools/acid-migrate/Acid.hs
@@ -54,10 +54,10 @@ instance Show BlogLang where
 
 $(deriveSafeCopy 0 'base ''BlogLang)
 
-data Comment = Comment { 
+data Comment = Comment {
+    cdate   :: UTCTime,
     cauthor :: Text,
-    ctext   :: Text,
-    cdate   :: UTCTime
+    ctext   :: Text
 } deriving (Eq, Ord, Show, Data, Typeable)
 
 $(deriveSafeCopy 0 'base ''Comment)
@@ -203,7 +203,7 @@ instance JSON Comment where
         jsscdate <- jsonField "cdate" obj :: Result JSValue
         let rcdate = stripResult $ jsonInt jsscdate
         sctext <- jsonField "ctext" obj
-        return $ Comment (pack scauthor) (pack sctext) (parseSeconds rcdate)
+        return $ Comment (parseSeconds rcdate) (pack scauthor) (pack sctext)
 
 instance JSON Entry where
     showJSON = undefined