mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Add config to services.
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
)
|
||||
|
||||
type AggregationService struct {
|
||||
Config *models.Config
|
||||
Db *gorm.DB
|
||||
HeartbeatService *HeartbeatService
|
||||
}
|
||||
|
@@ -11,7 +11,8 @@ import (
|
||||
const TableHeartbeat = "heartbeat"
|
||||
|
||||
type HeartbeatService struct {
|
||||
Db *gorm.DB
|
||||
Cofnig *models.Config
|
||||
Db *gorm.DB
|
||||
}
|
||||
|
||||
func (srv *HeartbeatService) InsertBatch(heartbeats *[]models.Heartbeat) error {
|
||||
|
@@ -8,7 +8,8 @@ import (
|
||||
const TableUser = "user"
|
||||
|
||||
type UserService struct {
|
||||
Db *gorm.DB
|
||||
Config *models.Config
|
||||
Db *gorm.DB
|
||||
}
|
||||
|
||||
func (srv *UserService) GetUserById(userId string) (*models.User, error) {
|
||||
|
Reference in New Issue
Block a user