Fixed logged out character page
This commit is contained in:
parent
290c18b8b9
commit
1dfd15f691
@ -68,9 +68,11 @@ func Get(ctx *aero.Context) string {
|
||||
}
|
||||
|
||||
// Friends
|
||||
var friends []*arn.User
|
||||
|
||||
if user != nil {
|
||||
friendIDs := utils.Intersection(character.Likes, user.Follows().Items)
|
||||
friendObjects := arn.DB.GetMany("User", friendIDs)
|
||||
friends := []*arn.User{}
|
||||
|
||||
for _, obj := range friendObjects {
|
||||
if obj == nil {
|
||||
@ -79,6 +81,7 @@ func Get(ctx *aero.Context) string {
|
||||
|
||||
friends = append(friends, obj.(*arn.User))
|
||||
}
|
||||
}
|
||||
|
||||
return ctx.HTML(components.CharacterDetails(character, characterAnime, quotes, friends, mainQuote, user))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user