Implement HTTP REST CRUD API

This commit is contained in:
ryyst committed 2026-02-02 21:17:03 +02:00
1 parent b309ccd9cd
commit d3f29e3927
4 files changed
+316

No files matched your search

+5
View File
@@ -28,6 +28,7 @@ type alarmFiredMsg scheduler.AlarmEvent
type alarmsLoadedMsg []db.Alarm
type snoozeFireMsg db.Alarm
type autoTimeoutMsg struct{}
type AlarmsChangedMsg struct{}
// Model is the main bubbletea model.
type Model struct {
@@ -149,6 +150,10 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
return m, nil
case AlarmsChangedMsg:
m.refreshAlarms()
return m, nil
case tickMsg:
m.now = time.Time(msg)
if m.firingAlarm != nil {