Beispiel #1
0
func restGetDeviceStats(m *model.Model, w http.ResponseWriter, r *http.Request) {
	var res = m.DeviceStatistics()
	w.Header().Set("Content-Type", "application/json; charset=utf-8")
	json.NewEncoder(w).Encode(res)
}