From 2a708c8d1ad8d14e55f8a454e15096ae6cc498ce Mon Sep 17 00:00:00 2001 From: Marvin Steadfast Date: Thu, 6 May 2021 10:19:39 +0200 Subject: [PATCH] cosmetic changes --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 35fca5d..a896217 100644 --- a/main.go +++ b/main.go @@ -68,6 +68,7 @@ func (l Logic) ServeHTTP(w http.ResponseWriter, r *http.Request) { logger.Debug().Str("body", string(body)).Msg("read body") var jd PublicInfo + if err := json.Unmarshal(body, &jd); err != nil { logger.Error().Msg(err.Error()) http.Error(w, "could not unmarshal body", http.StatusInternalServerError) @@ -75,8 +76,8 @@ func (l Logic) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } - // jd.LocalAddress = l.ExternalURL var nd PublicInfo + nd.ServerName = jd.ServerName nd.Version = jd.Version nd.ProductName = jd.ProductName