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:
@ -3,6 +3,7 @@ package v1
|
||||
import (
|
||||
"errors"
|
||||
"github.com/gorilla/mux"
|
||||
config2 "github.com/muety/wakapi/config"
|
||||
"github.com/muety/wakapi/models"
|
||||
v1 "github.com/muety/wakapi/models/compat/wakatime/v1"
|
||||
"github.com/muety/wakapi/services"
|
||||
@ -14,13 +15,13 @@ import (
|
||||
|
||||
type SummariesHandler struct {
|
||||
summarySrvc *services.SummaryService
|
||||
config *models.Config
|
||||
config *config2.Config
|
||||
}
|
||||
|
||||
func NewSummariesHandler(summaryService *services.SummaryService) *SummariesHandler {
|
||||
return &SummariesHandler{
|
||||
summarySrvc: summaryService,
|
||||
config: models.GetConfig(),
|
||||
config: config2.Get(),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user