mirror of
https://github.com/unpoller/unpoller.git
synced 2026-10-10 00:05:44 +02:00
reorder
This commit is contained in:
@@ -162,10 +162,6 @@ func (u *InputUnifi) dumpSitesJSON(c *Controller, path, name string, sites unifi
|
||||
// setDefaults sets defaults for the defaults and for the controllers.
|
||||
// which one depends on the useDefaults boolean.
|
||||
func (u *InputUnifi) setDefaults(c *Controller, useDefaults bool) {
|
||||
if c.Role == "" {
|
||||
c.Role = c.URL
|
||||
}
|
||||
|
||||
// Default defaults.
|
||||
if useDefaults {
|
||||
if c.SaveSites == nil {
|
||||
@@ -201,6 +197,10 @@ func (u *InputUnifi) setDefaults(c *Controller, useDefaults bool) {
|
||||
c.URL = u.Default.URL
|
||||
}
|
||||
|
||||
if c.Role == "" {
|
||||
c.Role = c.URL
|
||||
}
|
||||
|
||||
if c.Pass == "" {
|
||||
c.Pass = u.Default.Pass
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user