14.04.2026 Update
This commit is contained in:
16
handlers/dashboard.go
Normal file
16
handlers/dashboard.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"nano-router/monitor"
|
||||
)
|
||||
|
||||
func HandleDashboard(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodGet {
|
||||
fail(w, http.StatusMethodNotAllowed, "method not allowed")
|
||||
return
|
||||
}
|
||||
data := monitor.GetData()
|
||||
ok(w, data)
|
||||
}
|
||||
Reference in New Issue
Block a user