Refactor to use aerogo/database

This commit is contained in:
2017-10-27 09:11:56 +02:00
parent c0d7b0d2df
commit b07a98ed32
18 changed files with 52 additions and 164 deletions

View File

@ -10,11 +10,11 @@ import (
// Active ...
func Active(ctx *aero.Context) string {
users, err := arn.GetListOfUsersCached("active users")
users := arn.FilterUsers(func(user *arn.User) bool {
return user.IsActive() && user.HasAvatar()
})
if err != nil {
return ctx.Error(http.StatusInternalServerError, "Could not fetch user data", err)
}
arn.SortUsersLastSeen(users)
return ctx.HTML(components.Users(users))
}