2017-06-17 01:25:02 +02:00

20 lines
347 B
Go

package posts
import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// Get post.
func Get(ctx *aero.Context) string {
id := ctx.Get("id")
post, err := arn.GetPost(id)
if err != nil {
return ctx.Error(404, "Post not found", err)
}
return ctx.HTML(components.Post(post))
}