mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
feat: set html base path from server base path
refactor: services
This commit is contained in:
@ -22,14 +22,22 @@ type AggregationService struct {
|
||||
HeartbeatService *HeartbeatService
|
||||
}
|
||||
|
||||
func NewAggregationService(db *gorm.DB, userService *UserService, summaryService *SummaryService, heartbeatService *HeartbeatService) *AggregationService {
|
||||
return &AggregationService{
|
||||
Config: models.GetConfig(),
|
||||
Db: db,
|
||||
UserService: userService,
|
||||
SummaryService: summaryService,
|
||||
HeartbeatService: heartbeatService,
|
||||
}
|
||||
}
|
||||
|
||||
type AggregationJob struct {
|
||||
UserID string
|
||||
From time.Time
|
||||
To time.Time
|
||||
}
|
||||
|
||||
func (srv *AggregationService) Init() {}
|
||||
|
||||
// Schedule a job to (re-)generate summaries every day shortly after midnight
|
||||
// TODO: Make configurable
|
||||
func (srv *AggregationService) Schedule() {
|
||||
|
Reference in New Issue
Block a user