Added AMV editing UI
This commit is contained in:
@ -1,8 +1,23 @@
|
||||
package amv
|
||||
|
||||
import "github.com/aerogo/aero"
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Get a single AMV.
|
||||
func Get(ctx *aero.Context) string {
|
||||
return ctx.HTML("Coming soon™.")
|
||||
id := ctx.Get("id")
|
||||
amv, err := arn.GetAMV(id)
|
||||
user := utils.GetUser(ctx)
|
||||
|
||||
if err != nil {
|
||||
return ctx.Error(http.StatusNotFound, "AMV not found", err)
|
||||
}
|
||||
|
||||
return ctx.HTML(components.AMVPage(amv, user))
|
||||
}
|
||||
|
Reference in New Issue
Block a user