1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

refactor: move config to separate package

chore: load config from main method
This commit is contained in:
Ferdinand Mütsch
2020-09-29 18:55:07 +02:00
parent 062a9c6f57
commit f843be8d12
20 changed files with 79 additions and 62 deletions

View File

@ -1,6 +1,7 @@
package routes
import (
config2 "github.com/muety/wakapi/config"
"github.com/muety/wakapi/models"
"github.com/muety/wakapi/services"
"github.com/muety/wakapi/utils"
@ -9,13 +10,13 @@ import (
type SummaryHandler struct {
summarySrvc *services.SummaryService
config *models.Config
config *config2.Config
}
func NewSummaryHandler(summaryService *services.SummaryService) *SummaryHandler {
return &SummaryHandler{
summarySrvc: summaryService,
config: models.GetConfig(),
config: config2.Get(),
}
}