Merge pull request #9792 from kraktus/anon_blog

Fix `blog/friends` page for anon
pull/9796/head
Thibault Duplessis 2021-09-14 08:06:35 +02:00 committed by GitHub
commit 0cb1f90f3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -222,13 +222,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))
}
}
}