-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Introduce /admin/maintenance and expose fix top left maintenanc…
- Loading branch information
Showing
16 changed files
with
297 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
webapi/src/main/scala/org/knora/webapi/slice/admin/api/AdminApiRoutes.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright © 2021 - 2023 Swiss National Data and Service Center for the Humanities and/or DaSCH Service Platform contributors. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.knora.webapi.slice.admin.api | ||
|
||
import org.apache.pekko.http.scaladsl.server.Route | ||
import zio.ZLayer | ||
|
||
import org.knora.webapi.slice.common.api.TapirToPekkoInterpreter | ||
|
||
final case class AdminApiRoutes( | ||
maintenance: MaintenanceEndpointsHandlers, | ||
project: ProjectsEndpointsHandler, | ||
tapirToPekko: TapirToPekkoInterpreter | ||
) { | ||
|
||
private val handlers = maintenance.handlers ++ project.allHanders | ||
|
||
val routes: Seq[Route] = handlers.map(tapirToPekko.toRoute(_)) | ||
} | ||
|
||
object AdminApiRoutes { | ||
val layer = ZLayer.derive[AdminApiRoutes] | ||
} |
Oops, something went wrong.