mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 14:31:55 +01:00
ProductBarcode: backend: remove API response verbosity
This commit is contained in:
@@ -143,9 +143,9 @@ func (ctrl *V1Controller) HandleProductSearchFromBarcode(conf config.BarcodeAPIC
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert the body to type string
|
// Uncomment the following string for debug
|
||||||
sb := string(body)
|
// sb := string(body)
|
||||||
log.Info().Msg("Response: " + sb)
|
// log.Debug().Msg("Response: " + sb)
|
||||||
|
|
||||||
var result UPCITEMDBResponse
|
var result UPCITEMDBResponse
|
||||||
if err := json.Unmarshal(body, &result); err != nil { // Parse []byte to go struct pointer
|
if err := json.Unmarshal(body, &result); err != nil { // Parse []byte to go struct pointer
|
||||||
@@ -216,9 +216,9 @@ func (ctrl *V1Controller) HandleProductSearchFromBarcode(conf config.BarcodeAPIC
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert the body to type string
|
// Uncomment the following string for debug
|
||||||
sb := string(body)
|
// sb := string(body)
|
||||||
log.Info().Msg("Response: " + sb)
|
// log.Debug().Msg("Response: " + sb)
|
||||||
|
|
||||||
var result BARCODESPIDER_COMResponse
|
var result BARCODESPIDER_COMResponse
|
||||||
if err := json.Unmarshal(body, &result); err != nil { // Parse []byte to go struct pointer
|
if err := json.Unmarshal(body, &result); err != nil { // Parse []byte to go struct pointer
|
||||||
|
|||||||
Reference in New Issue
Block a user