[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] 08/14: adding webhook for the categories
From: |
gnunet |
Subject: |
[taler-merchant] 08/14: adding webhook for the categories |
Date: |
Sun, 08 Dec 2024 14:18:17 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
commit fb8713337339749196dcce3a78a69a9b9d6c91ca
Author: bohdan-potuzhnyi <bohdan.potuzhnyi@gmail.com>
AuthorDate: Thu Nov 21 09:38:34 2024 +0100
adding webhook for the categories
---
src/backenddb/merchant-0013.sql | 42 +++++++++++++++++++++++++++++++++++------
1 file changed, 36 insertions(+), 6 deletions(-)
diff --git a/src/backenddb/merchant-0013.sql b/src/backenddb/merchant-0013.sql
index ef3efbb4..29cbb1e2 100644
--- a/src/backenddb/merchant-0013.sql
+++ b/src/backenddb/merchant-0013.sql
@@ -57,7 +57,12 @@ BEGIN
-- INSERT case: Add a webhook for category addition
IF TG_OP = 'INSERT' THEN
FOR webhook IN
- SELECT * FROM merchant_webhook
+ SELECT webhook_serial,
+ merchant_serial,
+ url,
+ http_method,
+ body_template
+ FROM merchant_webhook
WHERE event_type = 'category_added'
AND merchant_serial = my_merchant_serial
LOOP
@@ -94,7 +99,12 @@ BEGIN
-- UPDATE case: Add a webhook for category update
IF TG_OP = 'UPDATE' THEN
FOR webhook IN
- SELECT * FROM merchant_webhook
+ SELECT webhook_serial,
+ merchant_serial,
+ url,
+ http_method,
+ body_template
+ FROM merchant_webhook
WHERE event_type = 'category_updated'
AND merchant_serial = my_merchant_serial
LOOP
@@ -139,7 +149,12 @@ BEGIN
-- DELETE case: Add a webhook for category deletion
IF TG_OP = 'DELETE' THEN
FOR webhook IN
- SELECT * FROM merchant_webhook
+ SELECT webhook_serial,
+ merchant_serial,
+ url,
+ http_method,
+ body_template
+ FROM merchant_webhook
WHERE event_type = 'category_deleted'
AND merchant_serial = my_merchant_serial
LOOP
@@ -195,7 +210,12 @@ BEGIN
-- INSERT case: Notify webhooks for inventory addition
IF TG_OP = 'INSERT' THEN
FOR webhook IN
- SELECT * FROM merchant_webhook
+ SELECT webhook_serial,
+ merchant_serial,
+ url,
+ http_method,
+ body_template
+ FROM merchant_webhook
WHERE event_type = 'inventory_added'
AND merchant_serial = my_merchant_serial
LOOP
@@ -268,7 +288,12 @@ BEGIN
-- UPDATE case: Notify webhooks for inventory update
IF TG_OP = 'UPDATE' THEN
FOR webhook IN
- SELECT * FROM merchant_webhook
+ SELECT webhook_serial,
+ merchant_serial,
+ url,
+ http_method,
+ body_template
+ FROM merchant_webhook
WHERE event_type = 'inventory_updated'
AND merchant_serial = my_merchant_serial
LOOP
@@ -380,7 +405,12 @@ BEGIN
-- DELETE case: Notify webhooks for inventory deletion
IF TG_OP = 'DELETE' THEN
FOR webhook IN
- SELECT * FROM merchant_webhook
+ SELECT webhook_serial,
+ merchant_serial,
+ url,
+ http_method,
+ body_template
+ FROM merchant_webhook
WHERE event_type = 'inventory_deleted'
AND merchant_serial = my_merchant_serial
LOOP
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-merchant] branch master updated (9438e749 -> a39cc48c), gnunet, 2024/12/08
- [taler-merchant] 03/14: small update of the categories webhook calls, gnunet, 2024/12/08
- [taler-merchant] 04/14: update of the templating, gnunet, 2024/12/08
- [taler-merchant] 02/14: adding webhook for the categories, gnunet, 2024/12/08
- [taler-merchant] 01/14: adding sql calls for the order_settled webhook, gnunet, 2024/12/08
- [taler-merchant] 06/14: few updates of the webhook trigger, gnunet, 2024/12/08
- [taler-merchant] 08/14: adding webhook for the categories,
gnunet <=
- [taler-merchant] 05/14: adding inventory realted webhooks adding, gnunet, 2024/12/08
- [taler-merchant] 07/14: small update of the styling, gnunet, 2024/12/08
- [taler-merchant] 10/14: tests added, gnunet, 2024/12/08
- [taler-merchant] 11/14: few design fixes, gnunet, 2024/12/08
- [taler-merchant] 12/14: small fix, gnunet, 2024/12/08
- [taler-merchant] 14/14: add check to test for openssl, gnunet, 2024/12/08
- [taler-merchant] 09/14: start test, gnunet, 2024/12/08
- [taler-merchant] 13/14: -fix logging, gnunet, 2024/12/08