From b0c69c203ee697b7adf962a54e27203a13cf4ceb Mon Sep 17 00:00:00 2001 From: JP Appel Date: Mon, 7 Oct 2024 00:46:47 -0400 Subject: Update vtt status endpoint to check container --- api/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/api.go') diff --git a/api/api.go b/api/api.go index b909755..251b647 100644 --- a/api/api.go +++ b/api/api.go @@ -52,7 +52,7 @@ func respondOnline(w http.ResponseWriter, status ServerStatus) { } func VttOnline(w http.ResponseWriter, req *http.Request) { - status := remoteOnline(req.Context(), VTT_URL) + status := vttStatus(req.Context()) if !status.Online { Logger.DebugContext(req.Context(), "Foundry VTT is offline") @@ -89,7 +89,7 @@ func VttLogs(w http.ResponseWriter, req *http.Request) { if _, err = stdcopy.StdCopy(w, w, logReader); err != nil { Logger.Error("Error occured while writting logs to response", slog.Any("err", err), slog.Any("request", req)) http.Error(w, "Error occured while writting logs", http.StatusInternalServerError) - return + return } } -- cgit v1.2.3