master #12

Merged
sinhluu merged 4 commits from master into develop 2023-10-23 07:41:48 +00:00
4 changed files with 5 additions and 3 deletions

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.17
require ( require (
git.selly.red/Selly-Modules/logger v0.0.2-0.20221010053254-567df039afdb git.selly.red/Selly-Modules/logger v0.0.2-0.20221010053254-567df039afdb
git.selly.red/Selly-Modules/natsio v1.0.3-0.20231006093940-b3bde5cd0960 git.selly.red/Selly-Modules/natsio v1.0.3-0.20231020090841-5edec97ee393
github.com/nats-io/nats.go v1.17.0 github.com/nats-io/nats.go v1.17.0
github.com/thoas/go-funk v0.9.2 github.com/thoas/go-funk v0.9.2
) )

2
go.sum
View File

@ -4,6 +4,8 @@ git.selly.red/Selly-Modules/natsio v1.0.2-0.20221010041139-c11419a3ad33 h1:GvQje
git.selly.red/Selly-Modules/natsio v1.0.2-0.20221010041139-c11419a3ad33/go.mod h1:KNODhfeBqxRmHHQHHU+p3JfH42t8s5aNxfgr6X8fr6g= git.selly.red/Selly-Modules/natsio v1.0.2-0.20221010041139-c11419a3ad33/go.mod h1:KNODhfeBqxRmHHQHHU+p3JfH42t8s5aNxfgr6X8fr6g=
git.selly.red/Selly-Modules/natsio v1.0.3-0.20231006093940-b3bde5cd0960 h1:wL/BW1xGoB/EXeA2HtxT6Nr/cXpPJYVNfToV3aFtGls= git.selly.red/Selly-Modules/natsio v1.0.3-0.20231006093940-b3bde5cd0960 h1:wL/BW1xGoB/EXeA2HtxT6Nr/cXpPJYVNfToV3aFtGls=
git.selly.red/Selly-Modules/natsio v1.0.3-0.20231006093940-b3bde5cd0960/go.mod h1:KNODhfeBqxRmHHQHHU+p3JfH42t8s5aNxfgr6X8fr6g= git.selly.red/Selly-Modules/natsio v1.0.3-0.20231006093940-b3bde5cd0960/go.mod h1:KNODhfeBqxRmHHQHHU+p3JfH42t8s5aNxfgr6X8fr6g=
git.selly.red/Selly-Modules/natsio v1.0.3-0.20231020090841-5edec97ee393 h1:43kE03FW3NONfE6hXlghafS1d233dfc7grlFqd+15SA=
git.selly.red/Selly-Modules/natsio v1.0.3-0.20231020090841-5edec97ee393/go.mod h1:KNODhfeBqxRmHHQHHU+p3JfH42t8s5aNxfgr6X8fr6g=
github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=

View File

@ -201,7 +201,7 @@ func (c *Client) UnregisterWebhook(req UnregisterWebhookReq) (*UnregisterWebhook
return nil, fmt.Errorf("kiotviet.Client.UnregisterWebhook - requestHttpViaNats bad request %s", res.Body) return nil, fmt.Errorf("kiotviet.Client.UnregisterWebhook - requestHttpViaNats bad request %s", res.Body)
} }
var data UnregisterWebhookRes var data UnregisterWebhookRes
if err = r.ParseResponseData(&data); err != nil { if err = r.ParseResponseData(&data.Success); err != nil {
return nil, fmt.Errorf("kiotviet.Client.UnregisterWebhook - requestHttpViaNats parse response %v, %s", err, res.Body) return nil, fmt.Errorf("kiotviet.Client.UnregisterWebhook - requestHttpViaNats parse response %v, %s", err, res.Body)
} }
return &data, nil return &data, nil

View File

@ -48,7 +48,7 @@ type WebhookBody struct {
type WebhookNotification struct { type WebhookNotification struct {
Action string `json:"Action"` Action string `json:"Action"`
Data []WebhookStockUpdateData `json:"data"` Data []WebhookStockUpdateData `json:"Data"`
} }
type WebhookStockUpdateData struct { type WebhookStockUpdateData struct {