2018-03-07 00:36:04 +01:00

24 lines
467 B
Go

package group
import (
"net/http"
"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)
if err != nil {
return ctx.Error(http.StatusNotFound, "Group not found", err)
}
return ctx.HTML(components.GroupForum(group, user))
}