Fix `blog/friends` page for anon

close https://github.com/ornicar/lila/issues/9788
pull/9792/head
kraktus 2021-09-13 14:27:42 +02:00
parent 75436fa831
commit 409207dd79
1 changed files with 3 additions and 5 deletions

View File

@ -214,13 +214,11 @@ final class Ublog(env: Env) extends LilaController(env) {
}
}
def friends(page: Int) = Open { implicit ctx =>
def friends(page: Int) = Auth { implicit ctx => me =>
NotForKids {
Reasonable(page, 10) {
ctx.me ?? { me =>
env.ublog.paginator.liveByFollowed(me, page) map { posts =>
Ok(html.ublog.index.friends(posts))
}
env.ublog.paginator.liveByFollowed(me, page) map { posts =>
Ok(html.ublog.index.friends(posts))
}
}
}