New sharer field: Creation time

This commit is contained in:
fr33domlover 2016-05-24 08:34:40 +00:00
parent 3dd82178f5
commit 19b576e795
2 changed files with 7 additions and 4 deletions

View file

@ -17,8 +17,9 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Sharer Sharer
ident ShrIdent ident ShrIdent
name Text Maybe name Text Maybe
created UTCTime default='now()'
UniqueSharer ident UniqueSharer ident

View file

@ -50,10 +50,12 @@ postPeopleR = do
((result, widget), enctype) <- runFormPost formPersonNew ((result, widget), enctype) <- runFormPost formPersonNew
case result of case result of
FormSuccess pn -> do FormSuccess pn -> do
now <- liftIO getCurrentTime
runDB $ do runDB $ do
let sharer = Sharer let sharer = Sharer
{ sharerIdent = text2shr $ uLogin pn { sharerIdent = text2shr $ uLogin pn
, sharerName = uName pn , sharerName = uName pn
, sharerCreated = now
} }
sid <- insert sharer sid <- insert sharer
let person = Person let person = Person