summaryrefslogtreecommitdiff
path: root/Handler/OpenItem.hs
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-03-16 01:19:07 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2017-03-16 01:19:07 +0100
commit3bfe0bdcb79b398a387e202c5150b5e6fd230d3a (patch)
tree8384b49048e84969a3a3440ed309b9c6e6b779de /Handler/OpenItem.hs
parent3ed9ec8ca70afb556f75d4e087043f4c67f50974 (diff)
downloadbar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.tar
bar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.tar.gz
bar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.tar.bz2
bar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.tar.xz
bar-3bfe0bdcb79b398a387e202c5150b5e6fd230d3a.zip
More complicated date handling
Diffstat (limited to 'Handler/OpenItem.hs')
-rw-r--r--Handler/OpenItem.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Handler/OpenItem.hs b/Handler/OpenItem.hs
index 468c6ec..3b1dfeb 100644
--- a/Handler/OpenItem.hs
+++ b/Handler/OpenItem.hs
@@ -5,7 +5,7 @@ import Import
5postOpenItemR :: ItemId -> Handler TypedContent 5postOpenItemR :: ItemId -> Handler TypedContent
6postOpenItemR itemId = do 6postOpenItemR itemId = do
7 today <- utctDay <$> liftIO getCurrentTime 7 today <- utctDay <$> liftIO getCurrentTime
8 result <- fmap (Entity itemId) . runDB $ updateGet itemId [ ItemOpened =. Just today 8 result <- fmap (Entity itemId) . runDB $ updateGet itemId [ ItemOpened =. DateKnown today
9 ] 9 ]
10 selectRep $ do 10 selectRep $ do
11 provideJson result 11 provideJson result