feat(m2): settings history, close day, holiday/vacation/sick marking
This commit is contained in:
@@ -43,13 +43,15 @@ func main() {
|
||||
settingsStore := store.NewSettingsStore(db)
|
||||
|
||||
entrySvc := service.NewEntryService(entryStore, closedDayStore, settingsStore, tz)
|
||||
daySvc := service.NewDayService(entryStore, closedDayStore, settingsStore, tz)
|
||||
settingsSvc := service.NewSettingsService(settingsStore)
|
||||
|
||||
// Background goroutine: auto-stop entries that cross midnight
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
go runMidnightGuard(ctx, entrySvc)
|
||||
|
||||
router := handler.NewRouter(cfg.AuthToken, entrySvc)
|
||||
router := handler.NewRouter(cfg.AuthToken, entrySvc, daySvc, settingsSvc)
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: ":" + cfg.Port,
|
||||
|
||||
Reference in New Issue
Block a user