25 lines
486 B
Go
25 lines
486 B
Go
package anime
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/aerogo/aero"
|
|
"github.com/animenotifier/arn"
|
|
"github.com/animenotifier/notify.moe/components"
|
|
"github.com/animenotifier/notify.moe/utils"
|
|
)
|
|
|
|
// Relations ...
|
|
func Relations(ctx *aero.Context) string {
|
|
user := utils.GetUser(ctx)
|
|
id := ctx.Get("id")
|
|
|
|
anime, err := arn.GetAnime(id)
|
|
|
|
if err != nil {
|
|
return ctx.Error(http.StatusNotFound, "Anime not found", err)
|
|
}
|
|
|
|
return ctx.HTML(components.AnimeRelations(anime, user, true))
|
|
}
|