23 lines
435 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-10 00:19:31 +00:00
users, err := arn.FilterUsers(func(user *arn.User) bool {
return user.IsActive()
})
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
}