mirror of
https://github.com/fleetdm/fleet
synced 2026-05-14 20:48:35 +00:00
For #31055. - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [X] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) ## Testing - [X] Added/updated automated tests - [x] QA'd all new/changed functionality manually
13 lines
453 B
Go
13 lines
453 B
Go
package service
|
|
|
|
import "github.com/fleetdm/fleet/v4/server/fleet"
|
|
|
|
func (c *Client) SaveSecretVariables(secretVariables []fleet.SecretVariable, dryRun bool) error {
|
|
verb, path := "PUT", "/api/latest/fleet/spec/secret_variables"
|
|
params := createSecretVariablesRequest{
|
|
SecretVariables: secretVariables,
|
|
DryRun: dryRun,
|
|
}
|
|
var responseBody createSecretVariablesResponse
|
|
return c.authenticatedRequest(params, verb, path, &responseBody)
|
|
}
|