mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
fb32f0cf40
Generally renamed `kolide` -> `fleet`
27 lines
622 B
Go
27 lines
622 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
"net/http"
|
|
|
|
"github.com/fleetdm/fleet/server/fleet"
|
|
)
|
|
|
|
func decodeModifyAppConfigRequest(ctx context.Context, r *http.Request) (interface{}, error) {
|
|
var payload fleet.AppConfigPayload
|
|
if err := json.NewDecoder(r.Body).Decode(&payload); err != nil {
|
|
return nil, err
|
|
}
|
|
return appConfigRequest{Payload: payload}, nil
|
|
}
|
|
|
|
func decodeApplyEnrollSecretSpecRequest(ctx context.Context, r *http.Request) (interface{}, error) {
|
|
var req applyEnrollSecretSpecRequest
|
|
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
|
return nil, err
|
|
}
|
|
return req, nil
|
|
|
|
}
|