mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-03-13 17:52:54 -04:00
Refactor: lambda to fn
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
This commit is contained in:
commit
5072926bfc
@ -73,7 +73,7 @@ class Config(configFilePath: String) {
|
||||
(AttributesEnum.CAPTCHA_EXPIRY_TIME_LIMIT.toString -> 5) ~
|
||||
(AttributesEnum.THROTTLE.toString -> 1000) ~
|
||||
(AttributesEnum.THREAD_DELAY.toString -> 2) ~
|
||||
(AttributesEnum.PLAYGROUND_ENABLED.toString -> "true") ~
|
||||
(AttributesEnum.PLAYGROUND_ENABLED.toString -> true) ~
|
||||
(AttributesEnum.CORS_HEADER.toString -> "") ~
|
||||
(AttributesEnum.MAX_ATTEMPTS.toString -> 10) ~
|
||||
("captchas" -> List(
|
||||
|
@ -37,5 +37,7 @@ case class ConfigField(
|
||||
lazy val maxAttemptsInt: Option[Int] = mapInt(maxAttempts)
|
||||
lazy val playgroundEnabledBool: Option[Boolean] = playgroundEnabled.map(_ || true)
|
||||
|
||||
private val mapInt = (x: Option[Integer]) => x.map(_ + 0)
|
||||
private def mapInt(x: Option[Integer]): Option[Int] = {
|
||||
x.map(_ + 0)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user