Fixed typo
This commit is contained in:
parent
51e24669df
commit
7526bed076
@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
const postLimit = 10
|
const postLimit = 10
|
||||||
|
|
||||||
// GetPostsbyUser shows all forum posts of a particular user.
|
// GetPostsByUser shows all forum posts of a particular user.
|
||||||
func GetPostsByUser(ctx *aero.Context) string {
|
func GetPostsByUser(ctx *aero.Context) string {
|
||||||
nick := ctx.Get("nick")
|
nick := ctx.Get("nick")
|
||||||
user, err := arn.GetUserByNick(nick)
|
user, err := arn.GetUserByNick(nick)
|
||||||
@ -31,9 +31,7 @@ func GetPostsByUser(ctx *aero.Context) string {
|
|||||||
postables = make([]arn.Postable, len(posts), len(posts))
|
postables = make([]arn.Postable, len(posts), len(posts))
|
||||||
|
|
||||||
for i, post := range posts {
|
for i, post := range posts {
|
||||||
|
|
||||||
postables[i] = arn.ToPostable(post)
|
postables[i] = arn.ToPostable(post)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctx.HTML(components.PostableList(postables))
|
return ctx.HTML(components.PostableList(postables))
|
||||||
|
Loading…
Reference in New Issue
Block a user