21 lines
389 B
Go
Raw Normal View History

2016-12-06 03:36:31 +00:00
package users
import (
2017-06-10 00:19:31 +00:00
"net/http"
2016-12-06 03:36:31 +00:00
"github.com/aerogo/aero"
2017-06-10 00:19:31 +00:00
"github.com/animenotifier/arn"
2016-12-06 03:36:31 +00:00
"github.com/animenotifier/notify.moe/components"
)
// Get ...
func Get(ctx *aero.Context) string {
2017-06-14 15:16:03 +00:00
users, err := arn.GetActiveUsersCached()
2017-06-10 00:19:31 +00:00
if err != nil {
return ctx.Error(http.StatusInternalServerError, "Could not fetch user data", err)
}
return ctx.HTML(components.Users(users))
2016-12-06 03:36:31 +00:00
}