Files
djk/internal/app/ui_network.go
T

14 lines
378 B
Go

package app
import (
"net/http"
)
func (a *UIApp) handleNetworkCheck(writer http.ResponseWriter, request *http.Request) {
if request.Method != http.MethodPost {
writeJSON(writer, http.StatusMethodNotAllowed, map[string]string{"error": "method not allowed"})
return
}
writeJSON(writer, http.StatusOK, map[string]any{"data": a.networkCheckResults(request.Context())})
}