Skip to content

Commit 3791ca9

Browse files
committed
Remove expected hash from 'api/v1/config' response payload
1 parent e9b3141 commit 3791ca9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

configs/settings/configuration.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ func (c *Configuration) updateFile() {
6161
func (c *Configuration) ToJSON() models.ConfigurationFile {
6262
c.mut.Lock()
6363
defer c.mut.Unlock()
64+
// remove admin
65+
newAdmins := []models.Admin{}
66+
if c.configFile.Admins != nil {
67+
for _, admin := range c.configFile.Admins {
68+
admin.ExpectedHash = ""
69+
newAdmins = append(newAdmins, admin)
70+
}
71+
}
72+
c.configFile.Admins = newAdmins
6473
return c.configFile
6574
}
6675

0 commit comments

Comments
 (0)