package handlers

import (
	"encoding/json"
	"mc-monitor/models"
	"net/http"
)

func ServersAPIHandler(w http.ResponseWriter, r *http.Request) {
	servers := models.GetServers()
	w.Header().Set("Content-Type", "application/json")
	json.NewEncoder(w).Encode(servers)
}
