small refactoring

This commit is contained in:
Niko Abeler 2022-08-18 21:10:03 +02:00
parent 3c6df116fa
commit defe031bc3
1 changed files with 4 additions and 8 deletions

View File

@ -75,12 +75,10 @@ func RenderPost(post Post) (string, error) {
return "", err
}
data := PageContent{
return renderIntoBaseTemplate(*post.user, PageContent{
Title: post.Title(),
Content: template.HTML(postHtml),
}
return renderIntoBaseTemplate(*post.user, data)
})
}
func RenderIndexPage(user User) (string, error) {
@ -91,12 +89,10 @@ func RenderIndexPage(user User) (string, error) {
return "", err
}
data := PageContent{
return renderIntoBaseTemplate(user, PageContent{
Title: "Index",
Content: template.HTML(postHtml),
}
return renderIntoBaseTemplate(user, data)
})
}