Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.5.1 #16

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ type (
Token string `json:"token,omitempty"`
API string `json:"api,omitempty"`
URL string `json:"url,omitempty"`
Format string `json:"format,omitempty"`
HTTPMethod string `json:"http_method,omitempty"`
Headers map[string]interface{} `json:"headers"`
CaFile string `json:"ca_file"`
Expand Down
6 changes: 3 additions & 3 deletions trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type (
TriggerRead(clientID int) (*TriggerRead, error)
TriggerCreate(triggerBody *TriggerCreate, clientID int) (*TriggerCreateResp, error)
TriggerDelete(clientID, triggerID int) error
TriggerUpdate(triggerBody *TriggerCreate, clientID, triggerID int) (*TriggerResp, error)
TriggerUpdate(triggerBody *TriggerCreate, clientID, triggerID int) (*TriggerCreateResp, error)
}

// TriggerFilters is used to specify params for Trigger["Filters"] which is used as a slice
Expand Down Expand Up @@ -161,14 +161,14 @@ func (api *api) TriggerDelete(clientID, triggerID int) error {

// TriggerUpdate updates existing trigger using unique ID.
// API reference: https://apiconsole.eu1.wallarm.com
func (api *api) TriggerUpdate(triggerBody *TriggerCreate, clientID, triggerID int) (*TriggerResp, error) {
func (api *api) TriggerUpdate(triggerBody *TriggerCreate, clientID, triggerID int) (*TriggerCreateResp, error) {

uri := fmt.Sprintf("/v2/clients/%d/triggers/%d", clientID, triggerID)
respBody, err := api.makeRequest("PUT", uri, "trigger", triggerBody)
if err != nil {
return nil, err
}
var t TriggerResp
var t TriggerCreateResp
if err = json.Unmarshal(respBody, &t); err != nil {
return nil, err
}
Expand Down
Loading