From 72b06338bc6a59ff681773a7f98cd7c7791aabcc Mon Sep 17 00:00:00 2001 From: Igor Date: Wed, 14 Aug 2024 13:05:59 +0400 Subject: [PATCH] Release 0.5.1 --- integration.go | 1 + trigger.go | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/integration.go b/integration.go index dcbea62..ec4099d 100644 --- a/integration.go +++ b/integration.go @@ -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"` diff --git a/trigger.go b/trigger.go index ddaff5a..f4afd7e 100644 --- a/trigger.go +++ b/trigger.go @@ -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 @@ -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 }