Skip to content

Commit

Permalink
refactoring after upgrading server dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fupelaqu committed Jul 28, 2023
1 parent bf7b4d2 commit 9606e75
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ThisBuild / organization := "app.softnetwork"

name := "generic-sequence-api"

ThisBuild / version := "0.2.0.1"
ThisBuild / version := "0.3.0"

ThisBuild / scalaVersion := "2.12.15"

Expand All @@ -54,9 +54,9 @@ val scalatest = Seq(
ThisBuild / libraryDependencies ++= Seq(
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.1",
"app.softnetwork.api" %% "generic-server-api" % Versions.server,
"app.softnetwork.api" %% "generic-server-api-testkit" % Versions.server % Test,
"app.softnetwork.protobuf" %% "scalapb-extensions" % "0.1.6"
"app.softnetwork.api" %% "generic-server-api" % Versions.genericPersistence,
"app.softnetwork.api" %% "generic-server-api-testkit" % Versions.genericPersistence % Test,
"app.softnetwork.protobuf" %% "scalapb-extensions" % "0.1.7"
) ++ scalatest

Compile / unmanagedResourceDirectories += baseDirectory.value / "src/main/protobuf"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package app.softnetwork.sbt.build

object Versions {

val genericPersistence = "0.3.0.3"

val server = "0.3.0.3"
val genericPersistence = "0.3.5"

val scalatest = "3.1.1"
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package app.softnetwork.sequence.launch

import akka.actor.typed.ActorSystem
import akka.http.scaladsl.server.Route
import app.softnetwork.api.server.ApiRoutes
import app.softnetwork.api.server.{ApiRoute, ApiRoutes}
import app.softnetwork.sequence.service.SequenceService

/** Created by smanciot on 07/04/2022.
*/
trait SequenceRoutes extends ApiRoutes {

override def apiRoutes(system: ActorSystem[_]): Route = SequenceService(system).route

override def apiRoutes: ActorSystem[_] => List[ApiRoute] =
system => List(SequenceService(system))
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import akka.actor.typed.ActorSystem
import akka.http.scaladsl.model.ContentTypes._
import akka.http.scaladsl.model.{HttpEntity, HttpResponse, StatusCodes}
import akka.http.scaladsl.server.{Directives, Route}
import app.softnetwork.api.server.DefaultComplete
import app.softnetwork.api.server.{ApiRoute, DefaultComplete}
import app.softnetwork.persistence.service.Service
import app.softnetwork.sequence.handlers.{GenericSequenceHandler, SequenceHandler}
import app.softnetwork.sequence.message._
Expand All @@ -17,8 +17,8 @@ import org.slf4j.{Logger, LoggerFactory}
trait GenericSequenceService
extends Service[SequenceCommand, SequenceResult]
with Directives
with DefaultComplete {
_: GenericSequenceHandler =>
with DefaultComplete
with ApiRoute { _: GenericSequenceHandler =>

implicit def formats: Formats = commonFormats

Expand Down

0 comments on commit 9606e75

Please sign in to comment.