fix blog tier mod log
parent
86c2ab1dd0
commit
27c8868990
|
@ -154,9 +154,13 @@ final class Ublog(env: Env) extends LilaController(env) {
|
|||
err => Redirect(urlOfBlog(blog)).flashFailure.fuccess,
|
||||
tier =>
|
||||
env.ublog.api.setTier(blog.id, tier) >>
|
||||
env.ublog.like.recomputeRankOfAllPosts(blog.id) >> env.mod.logApi
|
||||
.blogTier(lila.report.Mod(me.user), blog.id.full, tier)
|
||||
inject Redirect(urlOfBlog(blog)).flashSuccess
|
||||
env.ublog.like.recomputeRankOfAllPosts(blog.id) >> {
|
||||
blog.id match {
|
||||
case UblogBlog.Id.User(userId) =>
|
||||
env.mod.logApi.blogTier(lila.report.Mod(me.user), userId, UblogBlog.Tier.name(tier))
|
||||
case _ => funit
|
||||
}
|
||||
} inject Redirect(urlOfBlog(blog)).flashSuccess
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,9 @@ final class ModlogApi(repo: ModlogRepo, userRepo: UserRepo, ircApi: IrcApi)(impl
|
|||
add {
|
||||
Modlog(mod.user.id, streamerId.some, Modlog.streamerTier, v.toString.some)
|
||||
}
|
||||
def blogTier(mod: Mod, blogId: String, v: Int) =
|
||||
def blogTier(mod: Mod, blogId: String, v: String) =
|
||||
add {
|
||||
Modlog(mod.user.id, blogId.some, Modlog.blogTier, v.toString.some)
|
||||
Modlog(mod.user.id, blogId.some, Modlog.blogTier, v.some)
|
||||
}
|
||||
|
||||
def practiceConfig(mod: User.ID) =
|
||||
|
|
Loading…
Reference in New Issue