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,17 +3,18 @@ package services
|
||||
import (
|
||||
"errors"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/muety/wakapi/config"
|
||||
"github.com/muety/wakapi/models"
|
||||
)
|
||||
|
||||
type KeyValueService struct {
|
||||
Config *models.Config
|
||||
Config *config.Config
|
||||
Db *gorm.DB
|
||||
}
|
||||
|
||||
func NewKeyValueService(db *gorm.DB) *KeyValueService {
|
||||
return &KeyValueService{
|
||||
Config: models.GetConfig(),
|
||||
Config: config.Get(),
|
||||
Db: db,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user