mirror of
https://code.naskya.net/repos/ndqEd
synced 2025-03-20 15:14:54 +09:00
Add "about" field to person table, display in person page
This commit is contained in:
parent
e9ac361f27
commit
577df6ddcf
4 changed files with 18 additions and 2 deletions
src/Vervis
|
@ -487,7 +487,18 @@ instance AccountDB AccountPersistDB' where
|
|||
return $ Left $ mr $ MsgUsernameExists name
|
||||
Right sid -> do
|
||||
let defTime = UTCTime (ModifiedJulianDay 0) 0
|
||||
person = Person sid name pwd email False key now "" defTime
|
||||
person = Person
|
||||
{ personIdent = sid
|
||||
, personLogin = name
|
||||
, personPassphraseHash = pwd
|
||||
, personEmail = email
|
||||
, personVerified = False
|
||||
, personVerifiedKey = key
|
||||
, personVerifiedKeyCreated = now
|
||||
, personResetPassKey = ""
|
||||
, personResetPassKeyCreated = defTime
|
||||
, personAbout = ""
|
||||
}
|
||||
pid <- insert person
|
||||
return $ Right $ Entity pid person
|
||||
|
||||
|
|
|
@ -132,6 +132,8 @@ changes =
|
|||
, renameField "ProjectCollabAnon" "repo" "project"
|
||||
-- 24
|
||||
, renameField "ProjectCollabUser" "repo" "project"
|
||||
-- 25
|
||||
, addFieldPrimRequired "Person" ("" :: Text) "about"
|
||||
]
|
||||
|
||||
migrateDB :: MonadIO m => ReaderT SqlBackend m (Either Text (Int, Int))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue