Skip to content

Commit

Permalink
Fix #381 Failed to fetch webhook id by webhook dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
albinpa authored and georgepadayatti committed Oct 26, 2023
1 parent 818d9fc commit e8ac8f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/config
6 changes: 5 additions & 1 deletion src/v2/webhook_dispatcher/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ func webhookDeliveryCollection() *mongo.Collection {
}

// GetWebhookByOrgID Gets a webhook by organisation ID and webhook ID
func GetWebhookByOrgID(webhookId, orgID string) (result Webhook, err error) {
func GetWebhookByOrgID(webhookID, orgID string) (result Webhook, err error) {
webhookId, err := primitive.ObjectIDFromHex(webhookID)
if err != nil {
return result, err
}

err = webhookCollection().FindOne(context.TODO(), bson.M{"_id": webhookId, "orgid": orgID}).Decode(&result)

Expand Down

0 comments on commit e8ac8f3

Please sign in to comment.