From e35762074016c270d6df2613017ed5a08bfa0749 Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Wed, 5 Dec 2018 14:21:25 +0300 Subject: [PATCH] Plug correct stats handler functions. --- control.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/control.go b/control.go index f41655c3..9b57ed06 100644 --- a/control.go +++ b/control.go @@ -11,9 +11,9 @@ import ( "strings" "time" + "github.com/AdguardTeam/AdGuardHome/dnsforward" "github.com/AdguardTeam/AdGuardHome/upstream" - corednsplugin "github.com/AdguardTeam/AdGuardHome/coredns_plugin" "gopkg.in/asaskevich/govalidator.v4" ) @@ -676,17 +676,17 @@ func registerControlHandlers() { http.HandleFunc("/control/status", optionalAuth(ensureGET(handleStatus))) http.HandleFunc("/control/enable_protection", optionalAuth(ensurePOST(handleProtectionEnable))) http.HandleFunc("/control/disable_protection", optionalAuth(ensurePOST(handleProtectionDisable))) - http.HandleFunc("/control/querylog", optionalAuth(ensureGET(corednsplugin.HandleQueryLog))) + http.HandleFunc("/control/querylog", optionalAuth(ensureGET(dnsforward.HandleQueryLog))) http.HandleFunc("/control/querylog_enable", optionalAuth(ensurePOST(handleQueryLogEnable))) http.HandleFunc("/control/querylog_disable", optionalAuth(ensurePOST(handleQueryLogDisable))) http.HandleFunc("/control/set_upstream_dns", optionalAuth(ensurePOST(handleSetUpstreamDNS))) http.HandleFunc("/control/test_upstream_dns", optionalAuth(ensurePOST(handleTestUpstreamDNS))) http.HandleFunc("/control/i18n/change_language", optionalAuth(ensurePOST(handleI18nChangeLanguage))) http.HandleFunc("/control/i18n/current_language", optionalAuth(ensureGET(handleI18nCurrentLanguage))) - http.HandleFunc("/control/stats_top", optionalAuth(ensureGET(corednsplugin.HandleStatsTop))) - http.HandleFunc("/control/stats", optionalAuth(ensureGET(corednsplugin.HandleStats))) - http.HandleFunc("/control/stats_history", optionalAuth(ensureGET(corednsplugin.HandleStatsHistory))) - http.HandleFunc("/control/stats_reset", optionalAuth(ensurePOST(corednsplugin.HandleStatsReset))) + http.HandleFunc("/control/stats_top", optionalAuth(ensureGET(dnsforward.HandleStatsTop))) + http.HandleFunc("/control/stats", optionalAuth(ensureGET(dnsforward.HandleStats))) + http.HandleFunc("/control/stats_history", optionalAuth(ensureGET(dnsforward.HandleStatsHistory))) + http.HandleFunc("/control/stats_reset", optionalAuth(ensurePOST(dnsforward.HandleStatsReset))) http.HandleFunc("/control/version.json", optionalAuth(handleGetVersionJSON)) http.HandleFunc("/control/filtering/enable", optionalAuth(ensurePOST(handleFilteringEnable))) http.HandleFunc("/control/filtering/disable", optionalAuth(ensurePOST(handleFilteringDisable)))