more debugging
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Marvin Steadfast 2021-04-09 14:02:13 +02:00
parent b83f2df025
commit af068f70e8

16
main.go
View File

@ -24,13 +24,13 @@ type Logic struct {
// PublicInfo Chromecast configuration Payload.
type PublicInfo struct {
ID string
LocalAddress string
OperatingSystem string
ProductName string
ServerName string
StartupWizardCompleted bool
Version string
LocalAddress string `json:"LocalAddress"`
ServerName string `json:"ServerName"`
Version string `json:"Version"`
ProductName string `json:"ProductName"`
OperatingSystem string `json:"OperatingSystem"`
ID string `json:"Id"`
StartupWizardCompleted bool `json:"StartupWizardCompleted"`
}
func (l Logic) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@ -64,6 +64,8 @@ func (l Logic) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
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())