Update UserTimeline.hs
This commit is contained in:
parent
5c523c4841
commit
afe669a2ba
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user