New sharer field: Creation time
This commit is contained in:
parent
3dd82178f5
commit
19b576e795
2 changed files with 7 additions and 4 deletions
|
@ -19,6 +19,7 @@
|
||||||
Sharer
|
Sharer
|
||||||
ident ShrIdent
|
ident ShrIdent
|
||||||
name Text Maybe
|
name Text Maybe
|
||||||
|
created UTCTime default='now()'
|
||||||
|
|
||||||
UniqueSharer ident
|
UniqueSharer ident
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue