fleet/server/service/transport_targets.go

17 lines
295 B
Go
Raw Normal View History

2016-11-02 14:59:53 +00:00
package service
import (
"context"
2016-11-02 14:59:53 +00:00
"encoding/json"
"net/http"
)
func decodeSearchTargetsRequest(ctx context.Context, r *http.Request) (interface{}, error) {
var req searchTargetsRequest
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
return nil, err
}
return req, nil
}