Update UserTimeline.hs

This commit is contained in:
BergesJ 2017-07-05 00:13:57 +03:00 committed by GitHub
parent 5c523c4841
commit afe669a2ba

View File

@ -11,9 +11,9 @@ import Import
getUserTimelineR :: UserId -> Handler Html getUserTimelineR :: UserId -> Handler Html
getUserTimelineR uid = do getUserTimelineR uid = do
mayUser <- runDB $ get uid mayUser <- runDB $ get uid
posts <- runDB $ selectList [PostUserId ==. uid] [Desc PostCreated] posts <- runDB $ selectList [PostAuthor ==. uid] [Desc PostCreated]
let userName :: Text let userName :: Text
userName = maybe "UnkownUser" userIdent mayUser userName = maybe "UnkownUser" userIdent mayUser
defaultLayout $ do defaultLayout $ do
setTitle . toHtml $ show uid <> "'s Timeline" setTitle . toHtml $ show uid <> "'s Timeline"
$(widgetFile "userTimeline") $(widgetFile "userTimeline")