mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
Use no-op fts-client if disabled + push this flag to the webui
This commit is contained in:
@ -39,5 +39,6 @@ object RestAppImpl {
|
||||
private def createFtsClient[F[_]: ConcurrentEffect: ContextShift](
|
||||
cfg: Config
|
||||
)(client: Client[F]): Resource[F, FtsClient[F]] =
|
||||
SolrFtsClient(cfg.fullTextSearch.solr, client)
|
||||
if (cfg.fullTextSearch.enabled) SolrFtsClient(cfg.fullTextSearch.solr, client)
|
||||
else Resource.pure[F, FtsClient[F]](FtsClient.none[F])
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ case class Flags(
|
||||
baseUrl: LenientUri,
|
||||
signupMode: SignupConfig.Mode,
|
||||
docspellAssetPath: String,
|
||||
integrationEnabled: Boolean
|
||||
integrationEnabled: Boolean,
|
||||
fullTextSearchEnabled: Boolean
|
||||
)
|
||||
|
||||
object Flags {
|
||||
@ -23,7 +24,8 @@ object Flags {
|
||||
cfg.baseUrl,
|
||||
cfg.backend.signup.mode,
|
||||
s"/app/assets/docspell-webapp/${BuildInfo.version}",
|
||||
cfg.integrationEndpoint.enabled
|
||||
cfg.integrationEndpoint.enabled,
|
||||
cfg.fullTextSearch.enabled
|
||||
)
|
||||
|
||||
implicit val jsonEncoder: Encoder[Flags] =
|
||||
|
Reference in New Issue
Block a user