1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-27 18:44:51 +09:00

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
ident ShrIdent
name Text Maybe
ident ShrIdent
name Text Maybe
created UTCTime default='now()'
UniqueSharer ident

View file

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