Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed May 29, 2024
1 parent ec44be3 commit 7d2107c
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions project/src/routes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,13 @@ def routes(
),
fs2.io.file.Path(path.toString())
)(logger)
case Some(IndexHtmlConfig.StylesOnly(path)) =>
case Some(IndexHtmlConfig.IndexHtmlPath(externalPath)) =>
Router(
"" -> fileService[IO](FileService.Config(externalPath.toString()))
)
case Some(IndexHtmlConfig.StylesOnly(stylesPath)) =>
case Some(IndexHtmlConfig(Some(externalPath), None)) =>
StaticMiddleware(
Router(
"" -> fileService[IO](FileService.Config(externalPath.toString()))
),
fs2.io.file.Path(externalPath.toString())
)(logger)

case Some(IndexHtmlConfig(None, Some(stylesPath))) =>
generatedIndexHtml(injectStyles = true).combineK(
Router(
"" -> fileService[IO](FileService.Config(path.toString()))
)
Router(
"" -> fileService[IO](FileService.Config(stylesPath.toString()))
)

val refreshRoutes = HttpRoutes.of[IO] {
Expand Down

0 comments on commit 7d2107c

Please sign in to comment.