new Irwin ambiguity field
parent
c62cd731c8
commit
f173b1bd81
|
@ -22,9 +22,6 @@ object Irwin extends LilaController {
|
|||
}
|
||||
}
|
||||
|
||||
import scala.concurrent.duration._
|
||||
private lazy val irwinProcessedUserIds = new lila.memo.ExpireSetMemo(ttl = 30 minutes)
|
||||
|
||||
def getRequest = Open { implicit ctx =>
|
||||
ModExternalBot {
|
||||
Env.irwin.api.requests.getAndStart map {
|
||||
|
@ -60,6 +57,6 @@ object Irwin extends LilaController {
|
|||
}
|
||||
|
||||
private def ModExternalBot(f: => Fu[Result])(implicit ctx: Context) =
|
||||
if (!get("api_key").contains(Env.mod.ApiKey)) fuccess(NotFound)
|
||||
else f
|
||||
if (get("api_key") contains Env.mod.ApiKey) f
|
||||
else fuccess(NotFound)
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ case class IrwinReport(
|
|||
isLegit: Option[Boolean],
|
||||
activation: Int, // 0 = clean, 100 = cheater
|
||||
games: List[IrwinReport.GameReport],
|
||||
pv0ByAmbiguity: Option[List[Int]],
|
||||
date: DateTime
|
||||
) {
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ object JSONHandlers {
|
|||
(__ \ "isLegit").readNullable[Boolean] and
|
||||
(__ \ "activation").read[Int] and
|
||||
(__ \ "games").read[List[GameReport]] and
|
||||
(__ \ "pv0ByAmbiguity").read[List[Int]].map(some) and
|
||||
Reads(_ => JsSuccess(DateTime.now))
|
||||
)(IrwinReport.apply _)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue