feat: add diff, fix: configurable url
This commit is contained in:
parent
7adf624e95
commit
aa04904a72
4 changed files with 24 additions and 14 deletions
|
|
@ -11,11 +11,12 @@ import (
|
|||
|
||||
type ChangeDetections struct {
|
||||
widgetBase `yaml:",inline"`
|
||||
ChangeDetections feed.ChangeWatches `yaml:"-"`
|
||||
Watches []string `yaml:"watches"`
|
||||
Token OptionalEnvString `yaml:"token"`
|
||||
Limit int `yaml:"limit"`
|
||||
CollapseAfter int `yaml:"collapse-after"`
|
||||
ChangeDetections feed.ChangeWatches `yaml:"-"`
|
||||
RequestURL string `yaml:"request_url"`
|
||||
Watches []string `yaml:"watches"`
|
||||
Token OptionalEnvString `yaml:"token"`
|
||||
Limit int `yaml:"limit"`
|
||||
CollapseAfter int `yaml:"collapse-after"`
|
||||
}
|
||||
|
||||
func (widget *ChangeDetections) Initialize() error {
|
||||
|
|
@ -33,7 +34,7 @@ func (widget *ChangeDetections) Initialize() error {
|
|||
}
|
||||
|
||||
func (widget *ChangeDetections) Update(ctx context.Context) {
|
||||
watches, err := feed.FetchLatestDetectedChanges(widget.Watches, string(widget.Token))
|
||||
watches, err := feed.FetchLatestDetectedChanges(widget.RequestURL, widget.Watches, string(widget.Token))
|
||||
|
||||
if !widget.canContinueUpdateAfterHandlingErr(err) {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue