Implement HTTP REST CRUD API
This commit is contained in:
1 parent
b309ccd9cd
commit
d3f29e3927
4 files changed
+316
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user