Skip to content

Commit

Permalink
make lila-fishnet work again
Browse files Browse the repository at this point in the history
  • Loading branch information
schlawg committed Nov 8, 2023
1 parent 47c353e commit 43c9988
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
12 changes: 7 additions & 5 deletions app/AppLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package lila.app

import play.api._
import scala.annotation.nowarn
import play.api.routing.Router
import router.Routes
import play.api.routing.{ Router, SimpleRouter }
import play.api.routing.sird._

final class AppLoader extends ApplicationLoader {
def load(ctx: ApplicationLoader.Context): Application = new LilaComponents(ctx).application
Expand Down Expand Up @@ -32,9 +32,11 @@ final class LilaComponents(ctx: ApplicationLoader.Context) extends BuiltInCompon
lazy val controller = new FishnetController(configuration, redis, moveDb, controllerComponents)

// eagerly wire up all controllers
val router: Router = {
@nowarn val prefix: String = "/"
new Routes(httpErrorHandler, controller)
val router: Router = new SimpleRouter {
def routes: Router.Routes = {
case POST(p"/fishnet/acquire") => controller.acquire
case POST(p"/fishnet/move/$workId") => controller.move(workId)
}
}

if (configuration.get[Boolean]("kamon.enabled")) {
Expand Down
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ maintainer := "lichess.org"

lazy val root = Project("lila-fishnet", file("."))
.enablePlugins(PlayScala, PlayNettyServer)
.disablePlugins(PlayAkkaHttpServer)

scalaVersion := "2.13.12"
Compile / resourceDirectory := baseDirectory.value / "conf"
Expand Down
2 changes: 0 additions & 2 deletions conf/routes

This file was deleted.

2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.7.2
sbt.version=1.9.7
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ resolvers += Resolver.url(
"lila-maven-sbt",
url("https://raw.githubusercontent.com/ornicar/lila-maven/master")
)(Resolver.ivyStylePatterns)
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.18")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.18-lila_1.21")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

0 comments on commit 43c9988

Please sign in to comment.