Improved groups
This commit is contained in:
@ -6,10 +6,12 @@ import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Forum ...
|
||||
func Forum(ctx *aero.Context) string {
|
||||
user := utils.GetUser(ctx)
|
||||
id := ctx.Get("id")
|
||||
group, err := arn.GetGroup(id)
|
||||
|
||||
@ -17,5 +19,5 @@ func Forum(ctx *aero.Context) string {
|
||||
return ctx.Error(http.StatusNotFound, "Group not found", err)
|
||||
}
|
||||
|
||||
return ctx.HTML(components.GroupForum(group))
|
||||
return ctx.HTML(components.GroupForum(group, user))
|
||||
}
|
||||
|
Reference in New Issue
Block a user