mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-08 02:25:34 +08:00
remove expectation of json from decodeListDeviceRequest (#365)
This commit is contained in:
committed by
Victor Vrantchan
parent
175b84e631
commit
f7580b38bc
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user