remove superfluous function placeholders
parent
0d145310d2
commit
3d0a9fbe64
|
@ -388,7 +388,7 @@ final class Account(
|
|||
err => BadRequest(renderReopen(err.some, none)).fuccess,
|
||||
data =>
|
||||
env.security.reopen
|
||||
.prepare(data.username, data.realEmail, env.mod.logApi.hasModClose _) flatMap {
|
||||
.prepare(data.username, data.realEmail, env.mod.logApi.hasModClose) flatMap {
|
||||
case Left((code, msg)) =>
|
||||
lila.mon.user.auth.reopenRequest(code).increment()
|
||||
BadRequest(renderReopen(none, msg.some)).fuccess
|
||||
|
|
|
@ -40,7 +40,7 @@ final class Api(
|
|||
|
||||
val status = Action { req =>
|
||||
val appVersion = get("v", req)
|
||||
val mustUpgrade = appVersion exists lila.api.Mobile.AppVersion.mustUpgrade _
|
||||
val mustUpgrade = appVersion exists lila.api.Mobile.AppVersion.mustUpgrade
|
||||
Ok(apiStatusJson.add("mustUpgrade", mustUpgrade)) as JSON
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ final class Api(
|
|||
page = page.some,
|
||||
me = none,
|
||||
getUserTeamIds = _ => fuccess(Nil),
|
||||
getTeamName = env.team.getTeamName.apply _,
|
||||
getTeamName = env.team.getTeamName.apply,
|
||||
playerInfoExt = none,
|
||||
socketVersion = none,
|
||||
partial = false
|
||||
|
@ -427,7 +427,7 @@ final class Api(
|
|||
private[controllers] def GlobalConcurrencyLimitPerUserOption[T](
|
||||
user: Option[lila.user.User]
|
||||
): Option[SourceIdentity[T]] =
|
||||
user.fold(some[SourceIdentity[T]](identity _)) { u =>
|
||||
user.fold(some[SourceIdentity[T]](identity)) { u =>
|
||||
GlobalConcurrencyLimitUser.compose[T](u.id)
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ final class Preload(
|
|||
data,
|
||||
povs
|
||||
) ~ posts ~ tours ~ events ~ simuls ~ feat ~ entries ~ lead ~ tWinners ~ puzzle ~ streams ~ playban ~ blindGames =>
|
||||
(ctx.me ?? currentGameMyTurn(povs, lightUserApi.sync) _)
|
||||
(ctx.me ?? currentGameMyTurn(povs, lightUserApi.sync))
|
||||
.mon(_.lobby segment "currentGame") zip
|
||||
lightUserApi
|
||||
.preloadMany {
|
||||
|
|
|
@ -54,12 +54,12 @@ final private[api] class RoundApi(
|
|||
case json ~ simul ~ swiss ~ note ~ forecast ~ bookmarked =>
|
||||
(
|
||||
withTournament(pov, tour) _ compose
|
||||
withSwiss(swiss) _ compose
|
||||
withSimul(simul) _ compose
|
||||
withSteps(pov, initialFen) _ compose
|
||||
withNote(note) _ compose
|
||||
withBookmark(bookmarked) _ compose
|
||||
withForecastCount(forecast.map(_.steps.size)) _
|
||||
withSwiss(swiss) compose
|
||||
withSimul(simul) compose
|
||||
withSteps(pov, initialFen) compose
|
||||
withNote(note) compose
|
||||
withBookmark(bookmarked) compose
|
||||
withForecastCount(forecast.map(_.steps.size))
|
||||
)(json)
|
||||
}
|
||||
}
|
||||
|
@ -92,11 +92,11 @@ final private[api] class RoundApi(
|
|||
case json ~ simul ~ swiss ~ note ~ bookmarked =>
|
||||
(
|
||||
withTournament(pov, tour) _ compose
|
||||
withSwiss(swiss) _ compose
|
||||
withSimul(simul) _ compose
|
||||
withNote(note) _ compose
|
||||
withBookmark(bookmarked) _ compose
|
||||
withSteps(pov, initialFen) _
|
||||
withSwiss(swiss) compose
|
||||
withSimul(simul) compose
|
||||
withNote(note) compose
|
||||
withBookmark(bookmarked) compose
|
||||
withSteps(pov, initialFen)
|
||||
)(json)
|
||||
}
|
||||
}
|
||||
|
@ -131,12 +131,12 @@ final private[api] class RoundApi(
|
|||
case json ~ tour ~ simul ~ swiss ~ note ~ bookmarked =>
|
||||
(
|
||||
withTournament(pov, tour) _ compose
|
||||
withSwiss(swiss) _ compose
|
||||
withSimul(simul) _ compose
|
||||
withNote(note) _ compose
|
||||
withBookmark(bookmarked) _ compose
|
||||
withTree(pov, analysis, initialFen, withFlags) _ compose
|
||||
withAnalysis(pov.game, analysis) _
|
||||
withSwiss(swiss) compose
|
||||
withSimul(simul) compose
|
||||
withNote(note) compose
|
||||
withBookmark(bookmarked) compose
|
||||
withTree(pov, analysis, initialFen, withFlags) compose
|
||||
withAnalysis(pov.game, analysis)
|
||||
)(json)
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ final private[api] class RoundApi(
|
|||
) map { json =>
|
||||
(
|
||||
withTree(pov, analysis, initialFen, withFlags) _ compose
|
||||
withAnalysis(pov.game, analysis) _
|
||||
withAnalysis(pov.game, analysis)
|
||||
)(json)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ final class BlogApi(
|
|||
.pageSize(maxPerPage.value)
|
||||
.page(page)
|
||||
.submit()
|
||||
.fold(_ => none, some _)
|
||||
.fold(_ => none, some)
|
||||
.dmap2 { PrismicPaginator(_, page, maxPerPage) }
|
||||
|
||||
def recent(
|
||||
|
|
|
@ -38,7 +38,7 @@ object Iso {
|
|||
strs => strs.value mkString sep
|
||||
)
|
||||
|
||||
implicit def isoIdentity[A]: Iso[A, A] = apply(identity[A] _, identity[A] _)
|
||||
implicit def isoIdentity[A]: Iso[A, A] = apply(identity[A], identity[A])
|
||||
|
||||
implicit val stringIsoIdentity: Iso[String, String] = isoIdentity[String]
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ final class Cached(
|
|||
private val lastPlayedPlayingIdCache: LoadingCache[User.ID, Fu[Option[Game.ID]]] =
|
||||
CacheApi.scaffeineNoScheduler
|
||||
.expireAfterWrite(5 seconds)
|
||||
.build(gameRepo.lastPlayedPlayingId _)
|
||||
.build(gameRepo.lastPlayedPlayingId)
|
||||
|
||||
lila.common.Bus.subscribeFun("startGame") {
|
||||
case lila.game.actorApi.StartGame(game) => game.userIds foreach { lastPlayedPlayingIdCache.invalidate(_) }
|
||||
|
|
|
@ -135,41 +135,41 @@ private object I18nQuantity {
|
|||
case (lang, _) =>
|
||||
lang.language -> (lang.language match {
|
||||
|
||||
case "fr" | "ff" | "kab" => french _
|
||||
case "fr" | "ff" | "kab" => french
|
||||
|
||||
case "cs" | "sk" => czech _
|
||||
case "cs" | "sk" => czech
|
||||
|
||||
case "hr" | "ru" | "sr" | "uk" | "be" | "bs" | "sh" => balkan _
|
||||
case "hr" | "ru" | "sr" | "uk" | "be" | "bs" | "sh" => balkan
|
||||
|
||||
case "lv" => latvian _
|
||||
case "lv" => latvian
|
||||
|
||||
case "lt" => lithuanian _
|
||||
case "lt" => lithuanian
|
||||
|
||||
case "pl" => polish _
|
||||
case "pl" => polish
|
||||
|
||||
case "ro" | "mo" => romanian _
|
||||
case "ro" | "mo" => romanian
|
||||
|
||||
case "sl" => slovenian _
|
||||
case "sl" => slovenian
|
||||
|
||||
case "ar" => arabic _
|
||||
case "ar" => arabic
|
||||
|
||||
case "mk" => macedonian _
|
||||
case "mk" => macedonian
|
||||
|
||||
case "cy" | "br" => welsh _
|
||||
case "cy" | "br" => welsh
|
||||
|
||||
case "mt" => maltese _
|
||||
case "mt" => maltese
|
||||
|
||||
case "ga" | "se" | "sma" | "smi" | "smj" | "smn" | "sms" => two _
|
||||
case "ga" | "se" | "sma" | "smi" | "smj" | "smn" | "sms" => two
|
||||
|
||||
case "ak" | "am" | "bh" | "fil" | "tl" | "guw" | "hi" | "ln" | "mg" | "nso" | "ti" | "wa" =>
|
||||
selectors.zero _
|
||||
selectors.zero
|
||||
|
||||
case "az" | "bm" | "fa" | "ig" | "hu" | "ja" | "kde" | "kea" | "ko" | "my" | "ses" | "sg" | "to" |
|
||||
"tr" | "vi" | "wo" | "yo" | "zh" | "bo" | "dz" | "id" | "jv" | "ka" | "km" | "kn" | "ms" | "th" |
|
||||
"tp" | "io" | "ia" =>
|
||||
selectors.none _
|
||||
selectors.none
|
||||
|
||||
case _ => default _
|
||||
case _ => default
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ object Chart {
|
|||
def xAxis(implicit lang: Lang) =
|
||||
Xaxis(
|
||||
name = dimension.name,
|
||||
categories = clusters.map(_.x).map(Dimension.valueJson(dimension) _),
|
||||
categories = clusters.map(_.x).map(Dimension.valueJson(dimension)),
|
||||
dataType = Dimension dataTypeOf dimension
|
||||
)
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ final class Env(
|
|||
|
||||
system.actorOf(Props(wire[Titivate]), name = "titivate")
|
||||
|
||||
new CorresAlarm(db(config.alarmColl), isUserPresent, proxyRepo.game _)
|
||||
new CorresAlarm(db(config.alarmColl), isUserPresent, proxyRepo.game)
|
||||
|
||||
private lazy val takebacker = wire[Takebacker]
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ final class SecurityApi(
|
|||
case None if User.couldBeUsername(str) => authenticator.loginCandidateById(User normalize str)
|
||||
case _ => fuccess(none)
|
||||
}
|
||||
} map loadedLoginForm _
|
||||
} map loadedLoginForm
|
||||
|
||||
@nowarn("cat=unused")
|
||||
private def authenticateCandidate(candidate: Option[LoginCandidate])(
|
||||
|
|
|
@ -83,7 +83,7 @@ final class Env(
|
|||
if (tour.isShield) scheduler.scheduleOnce(10 seconds) { shieldApi.clear() }
|
||||
else if (Revolution is tour) scheduler.scheduleOnce(10 seconds) { revolutionApi.clear() }
|
||||
},
|
||||
indexLeaderboard = leaderboardIndexer.indexOne _
|
||||
indexLeaderboard = leaderboardIndexer.indexOne
|
||||
)
|
||||
|
||||
private lazy val colorHistoryApi = wire[ColorHistoryApi]
|
||||
|
|
|
@ -211,7 +211,7 @@ final class RankingApi(
|
|||
(Glicko.minRating to 2800 by Stat.group).map { r =>
|
||||
hash.getOrElse(r, 0)
|
||||
}.toList
|
||||
} addEffect monitorRatingDistribution(perfId) _
|
||||
} addEffect monitorRatingDistribution(perfId)
|
||||
}
|
||||
|
||||
/* monitors cumulated ratio of players in each rating group, for a perf
|
||||
|
|
Loading…
Reference in New Issue