Tracks have permalinks now

This commit is contained in:
2017-06-28 00:16:45 +02:00
parent 5099c0b0e7
commit d5dcd9c909
9 changed files with 89 additions and 12 deletions

View File

@ -1,6 +1,8 @@
package posts
import (
"net/http"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
@ -12,7 +14,7 @@ func Get(ctx *aero.Context) string {
post, err := arn.GetPost(id)
if err != nil {
return ctx.Error(404, "Post not found", err)
return ctx.Error(http.StatusNotFound, "Post not found", err)
}
return ctx.HTML(components.Post(post))