From cb30fbbf8a1d5680595ed3841ef75cebad433ca1 Mon Sep 17 00:00:00 2001 From: JP Appel Date: Tue, 8 Oct 2024 11:15:35 -0400 Subject: Remove static and site status endpoints Since this backend will only ever be deployed on the same machine as the site, the site status endpoint is superfluous. Serving static files falls outside of the roles fo this backend, it is better performed by a service with caching features like NGINX. --- api/api.go | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'api/api.go') diff --git a/api/api.go b/api/api.go index 251b647..eb801eb 100644 --- a/api/api.go +++ b/api/api.go @@ -93,17 +93,6 @@ func VttLogs(w http.ResponseWriter, req *http.Request) { } } -func SiteOnline(w http.ResponseWriter, req *http.Request) { - const URL string = "https://dnd.jpappel.xyz" - - status := remoteOnline(req.Context(), URL) - if !status.Online { - Logger.DebugContext(req.Context(), "Campaign Website is offline") - } - - respondOnline(w, status) -} - func init() { Logger = slog.New(slog.NewTextHandler(os.Stdout, nil)) } -- cgit v1.2.3