Added cover image support for the beta
This commit is contained in:
19
pages/profile/profile.go
Normal file
19
pages/profile/profile.go
Normal file
@ -0,0 +1,19 @@
|
||||
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 {
|
||||
return ctx.Error(404, "User not found")
|
||||
}
|
||||
|
||||
return ctx.HTML(components.Profile(user, nil))
|
||||
}
|
Reference in New Issue
Block a user