refactor: use is configured check in ldap service

This commit is contained in:
Stavros
2026-02-01 19:05:42 +02:00
parent 671343f677
commit eff5fc8b71
3 changed files with 17 additions and 9 deletions

View File

@@ -3,7 +3,6 @@ package bootstrap
import (
"github.com/steveiliop56/tinyauth/internal/repository"
"github.com/steveiliop56/tinyauth/internal/service"
"github.com/steveiliop56/tinyauth/internal/utils/tlog"
)
type Services struct {
@@ -31,12 +30,12 @@ func (app *BootstrapApp) initServices(queries *repository.Queries) (Services, er
err := ldapService.Init()
if err == nil {
services.ldapService = ldapService
} else {
tlog.App.Warn().Err(err).Msg("Failed to initialize LDAP service, continuing without it")
if err != nil {
return Services{}, err
}
services.ldapService = ldapService
dockerService := service.NewDockerService()
err = dockerService.Init()