Configuration fixes

This commit is contained in:
Pijus Kamandulis committed 2024-12-18 23:28:04 +02:00
1 parent 777034181f
commit 83f086a2dc
2 files changed
+10 -7

No files matched your search

+4 -4
View File
@@ -16,6 +16,10 @@ import (
func (s *ApiServer) CreateRouter(repository *repositories.DataRepository) {
routeHandlers := handlers.NewHandlers(repository, s.config)
if !s.config.Debug {
gin.SetMode(gin.ReleaseMode)
}
router := gin.Default(func(e *gin.Engine) {
e.RedirectTrailingSlash = false
})
@@ -61,10 +65,6 @@ func (s *ApiServer) CreateRouter(repository *repositories.DataRepository) {
}
func (s *ApiServer) Start() {
if !s.config.Debug {
gin.SetMode(gin.ReleaseMode)
}
listenAddress := fmt.Sprintf(":%d", s.config.Port)
s.isActive = true