diff options
author | Jakob Borg <jakob@nym.se> | 2014-06-11 22:29:49 +0200 |
---|---|---|
committer | Jakob Borg <jakob@nym.se> | 2014-06-11 22:29:49 +0200 |
commit | 9cd6b85c09312ca36598a8e60a78a941d8e22ad2 (patch) | |
tree | eaa893cb6dd1be4f560814ff3df0c51164a470d8 /cmd | |
parent | f40f3b3b7be8127b6adf497f68f9450304eea47f (diff) |
Remove dead code from previous commit
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/syncthing/gui.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index 48f43de3c8..5e1add404b 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -108,8 +108,6 @@ func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) erro router.Post("/rest/error", restPostError) router.Post("/rest/error/clear", restClearErrors) router.Post("/rest/discovery/hint", restPostDiscoveryHint) - router.Post("/rest/report/enable", restPostReportEnable) - router.Post("/rest/report/disable", restPostReportDisable) mr := martini.New() mr.Use(csrfMiddleware) @@ -388,33 +386,6 @@ func getQR(w http.ResponseWriter, params martini.Params) { w.Write(code.PNG()) } -func restPostReportEnable(m *model.Model) { - if cfg.Options.UREnabled { - return - } - - cfg.Options.UREnabled = true - cfg.Options.URDeclined = false - cfg.Options.URAccepted = usageReportVersion - - go usageReportingLoop(m) - sendUsageRport(m) - saveConfig() -} - -func restPostReportDisable(m *model.Model) { - if !cfg.Options.UREnabled { - return - } - - cfg.Options.UREnabled = false - cfg.Options.URDeclined = true - cfg.Options.URAccepted = 0 - - stopUsageReporting() - saveConfig() -} - func basic(username string, passhash string) http.HandlerFunc { return func(res http.ResponseWriter, req *http.Request) { if validAPIKey(req.Header.Get("X-API-Key")) { |