lib/api: Fix body of renamed config/restart-required endpoint (ref #7402) (#7453)

This commit is contained in:
Simon Frei
2021-03-11 15:54:05 +01:00
committed by GitHub
parent 3938b61c3f
commit 4465cdf8bc
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -51,6 +51,12 @@ func (c *configMuxBuilder) registerConfigInsync(path string) {
})
}
func (c *configMuxBuilder) registerConfigRequiresRestart(path string) {
c.HandlerFunc(http.MethodGet, path, func(w http.ResponseWriter, _ *http.Request) {
sendJSON(w, map[string]bool{"requiresRestart": c.cfg.RequiresRestart()})
})
}
func (c *configMuxBuilder) registerFolders(path string) {
c.HandlerFunc(http.MethodGet, path, func(w http.ResponseWriter, _ *http.Request) {
sendJSON(w, c.cfg.FolderList())