remove expectation of json from decodeListDeviceRequest (#365)

This commit is contained in:
Brett Demetris
2018-01-08 17:24:04 -08:00
committed by Victor Vrantchan
parent 175b84e631
commit f7580b38bc

View File

@@ -2,7 +2,6 @@ package device
import (
"context"
"encoding/json"
"net/http"
"time"
@@ -51,9 +50,6 @@ func (r getDevicesResponse) Failed() error { return r.Err }
func decodeListDevicesRequest(ctx context.Context, r *http.Request) (interface{}, error) {
defer r.Body.Close()
var opts ListDevicesOption
if err := json.NewDecoder(r.Body).Decode(&opts); err != nil {
return nil, err
}
req := getDevicesRequest{Opts: opts}
return req, nil
}