16 lines
276 B
Go
16 lines
276 B
Go
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)
|
|
} |