fleet/server/service/transport_appconfig.go
2017-02-01 10:20:50 -07:00

19 lines
399 B
Go

package service
import (
"encoding/json"
"net/http"
"github.com/kolide/kolide/server/kolide"
"golang.org/x/net/context"
)
func decodeModifyAppConfigRequest(ctx context.Context, r *http.Request) (interface{}, error) {
var payload kolide.AppConfigPayload
if err := json.NewDecoder(r.Body).Decode(&payload); err != nil {
return nil, err
}
return appConfigRequest{Payload: payload}, nil
}