Skip to content

Commit

Permalink
Patch API URL version
Browse files Browse the repository at this point in the history
  • Loading branch information
Krisjanis Veinbahs committed Mar 12, 2022
1 parent d9ae2d5 commit 197f6f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ case class DIPTestbedConfig(
def appPrefix = s"/app"
def assetsPrefix = s"/app/assets"

def withVersionApiPrefix(version: String) = s"${apiPrefix}/${version}"
def withBase(path: String): String = s"${basePath}/${path.stripPrefix("/")}"
def withAppPath(path: String): String = withBase(s"${appPrefix}/${path.stripPrefix("/")}")
def withAssetPath(path: String): String = withBase(s"${assetsPrefix}/${path.stripPrefix("/")}")
Expand Down
2 changes: 1 addition & 1 deletion backend/web/app/diptestbed/web/DIPTestbedModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class DIPTestbedModule(context: Context)(implicit iort: IORuntime)
lazy val router: Router =
new DIPTestbedRouter(
apiRouter,
appConfig.withBase(appConfig.apiPrefix),
appConfig.withBase(appConfig.withVersionApiPrefix("v1")),
assetsRouter,
appConfig.withBase(appConfig.assetsPrefix),
appRouter,
Expand Down

0 comments on commit 197f6f0

Please sign in to comment.