Sort user list by last seen users

This commit is contained in:
Eduard Urbach 2017-06-23 16:41:24 +02:00
parent 5476753520
commit 8c182f8a4e
2 changed files with 5 additions and 1 deletions

View File

@ -24,7 +24,7 @@ func main() {
// Sort
sort.Slice(users, func(i, j int) bool {
return users[i].Registered < users[j].Registered
return users[i].LastSeen > users[j].LastSeen
})
// Add users to list

View File

@ -83,3 +83,7 @@ component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList,
.post-toolbar.active
.spacer
.post-likes= len(post.Likes)
if user != nil && user.Role == "admin"
.side-note
a(href="/api/user/" + viewUser.ID)= "API: ", user.Nick