Remove dead code from previous commit

This commit is contained in:
Jakob Borg 2014-06-11 22:29:49 +02:00
parent f40f3b3b7b
commit 9cd6b85c09

View File

@ -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")) {