reminders: add ListReminders IPC + /reminders web page
Store layer: ListReminders returns the n most recent reminders (newest first). IPC: new MethodListReminders wired through server, client, and lockedAPI. Web: /reminders page with table of created time, fire time, status badge, and payload text; empty state with prompt to ask maven for a reminder. Sidebar entry under Automation.
This commit is contained in:
@@ -249,6 +249,14 @@ func (c *Client) MarkReminder(ctx context.Context, id int64, status string) erro
|
||||
return c.call(ctx, MethodMarkReminder, markReminderReq{ID: id, Status: status}, nil)
|
||||
}
|
||||
|
||||
func (c *Client) ListReminders(ctx context.Context, n int) ([]Reminder, error) {
|
||||
var out []Reminder
|
||||
if err := c.call(ctx, MethodListReminders, nReq{N: n}, &out); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *Client) RecordNudge(ctx context.Context, rule, channel, message string, ts time.Time) (int64, error) {
|
||||
var r idResp
|
||||
if err := c.call(ctx, MethodRecordNudge, recordNudgeReq{Rule: rule, Channel: channel, Message: message, Ts: ts}, &r); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user