feat(m2): settings history, close day, holiday/vacation/sick marking

This commit is contained in:
2026-04-30 16:37:56 +02:00
parent 3aa068efd2
commit 4a0e0c8318
7 changed files with 607 additions and 2 deletions

View File

@@ -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,