move imageDefaults from watch to defaults in config root

This commit is contained in:
CrazyMax
2023-09-23 13:26:09 +02:00
parent b9615bf2db
commit b2a19c457c
22 changed files with 136 additions and 127 deletions

View File

@@ -34,11 +34,11 @@ func (c *Client) listFileImage() []model.Image {
for _, item := range items {
// Set default WatchRepo
if item.WatchRepo == nil {
item.WatchRepo = c.imageDefaults.WatchRepo
item.WatchRepo = c.defaults.WatchRepo
}
// Check NotifyOn
if len(item.NotifyOn) == 0 {
item.NotifyOn = c.imageDefaults.NotifyOn
item.NotifyOn = c.defaults.NotifyOn
} else {
for _, no := range item.NotifyOn {
if !no.Valid() {
@@ -52,7 +52,7 @@ func (c *Client) listFileImage() []model.Image {
// Check SortType
if item.SortTags == "" {
item.SortTags = c.imageDefaults.SortTags
item.SortTags = c.defaults.SortTags
}
if !item.SortTags.Valid() {
c.logger.Error().