20 lines
367 B
Go
Raw Normal View History

2016-11-20 10:26:11 +00:00
package profile
import (
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// Get ...
func Get(ctx *aero.Context) string {
nick := ctx.Get("nick")
user, err := arn.GetUserByNick(nick)
if err != nil {
2016-11-23 05:26:59 +00:00
return ctx.Error(404, "User not found", err)
2016-11-20 10:26:11 +00:00
}
return ctx.HTML(components.Profile(user, nil))
}