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