more debugging
This commit is contained in:
parent
b83f2df025
commit
af068f70e8
16
main.go
16
main.go
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user