aboutsummaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd.c
diff options
context:
space:
mode:
authorChristian Blättler <blatc2@bfh.ch>2024-06-13 11:34:46 +0200
committerChristian Blättler <blatc2@bfh.ch>2024-06-13 11:34:46 +0200
commit599db2c13cc7b4eddab22f1e8ef55dde23086f68 (patch)
tree53f1060f6507cffdaf3a139428d7ab4614b13efa /src/backend/taler-merchant-httpd.c
parentb9315cf4675bfb2ae94b71cf8931963b27873a5b (diff)
parent2e8cfbe844d4fbcf5fa6f086be0b184821e1bdc2 (diff)
Merge branch 'master' into tokens-payment
# Conflicts: # src/backend/taler-merchant-httpd_private-post-orders.c # src/backenddb/Makefile.am # src/backenddb/merchant-0006.sql # src/backenddb/pg_insert_token_family_key.c
Diffstat (limited to 'src/backend/taler-merchant-httpd.c')
-rw-r--r--src/backend/taler-merchant-httpd.c54
1 files changed, 53 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
index 95ba9bf1..a7c1cbb4 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -34,6 +34,7 @@
#include "taler-merchant-httpd_get-templates-ID.h"
#include "taler-merchant-httpd_mhd.h"
#include "taler-merchant-httpd_private-delete-account-ID.h"
+#include "taler-merchant-httpd_private-delete-categories-ID.h"
#include "taler-merchant-httpd_private-delete-instances-ID.h"
#include "taler-merchant-httpd_private-delete-instances-ID-token.h"
#include "taler-merchant-httpd_private-delete-products-ID.h"
@@ -45,9 +46,12 @@
#include "taler-merchant-httpd_private-delete-webhooks-ID.h"
#include "taler-merchant-httpd_private-get-accounts.h"
#include "taler-merchant-httpd_private-get-accounts-ID.h"
+#include "taler-merchant-httpd_private-get-categories.h"
+#include "taler-merchant-httpd_private-get-categories-ID.h"
#include "taler-merchant-httpd_private-get-instances.h"
#include "taler-merchant-httpd_private-get-instances-ID.h"
#include "taler-merchant-httpd_private-get-instances-ID-kyc.h"
+#include "taler-merchant-httpd_private-get-pos.h"
#include "taler-merchant-httpd_private-get-products.h"
#include "taler-merchant-httpd_private-get-products-ID.h"
#include "taler-merchant-httpd_private-get-orders.h"
@@ -62,6 +66,7 @@
#include "taler-merchant-httpd_private-get-webhooks.h"
#include "taler-merchant-httpd_private-get-webhooks-ID.h"
#include "taler-merchant-httpd_private-patch-accounts-ID.h"
+#include "taler-merchant-httpd_private-patch-categories-ID.h"
#include "taler-merchant-httpd_private-patch-instances-ID.h"
#include "taler-merchant-httpd_private-patch-orders-ID-forget.h"
#include "taler-merchant-httpd_private-patch-otp-devices-ID.h"
@@ -70,6 +75,7 @@
#include "taler-merchant-httpd_private-patch-token-families-SLUG.h"
#include "taler-merchant-httpd_private-patch-webhooks-ID.h"
#include "taler-merchant-httpd_private-post-account.h"
+#include "taler-merchant-httpd_private-post-categories.h"
#include "taler-merchant-httpd_private-post-instances.h"
#include "taler-merchant-httpd_private-post-instances-ID-auth.h"
#include "taler-merchant-httpd_private-post-instances-ID-token.h"
@@ -932,6 +938,52 @@ url_handler (void *cls,
.method = MHD_HTTP_METHOD_GET,
.handler = &TMH_private_get_instances_ID_kyc,
},
+ /* GET /pos: */
+ {
+ .url_prefix = "/pos",
+ .method = MHD_HTTP_METHOD_GET,
+ .handler = &TMH_private_get_pos
+ },
+ /* GET /categories: */
+ {
+ .url_prefix = "/categories",
+ .method = MHD_HTTP_METHOD_GET,
+ .handler = &TMH_private_get_categories
+ },
+ /* POST /categories: */
+ {
+ .url_prefix = "/categories",
+ .method = MHD_HTTP_METHOD_POST,
+ .handler = &TMH_private_post_categories,
+ /* allow category data of up to 8 kb, that should be plenty */
+ .max_upload = 1024 * 8
+ },
+ /* GET /categories/$ID: */
+ {
+ .url_prefix = "/categories/",
+ .method = MHD_HTTP_METHOD_GET,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_private_get_categories_ID
+ },
+ /* DELETE /categories/$ID: */
+ {
+ .url_prefix = "/categories/",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_private_delete_categories_ID
+ },
+ /* PATCH /categories/$ID/: */
+ {
+ .url_prefix = "/categories/",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_private_patch_categories_ID,
+ /* allow category data of up to 8 kb, that should be plenty */
+ .max_upload = 1024 * 8
+ },
/* GET /products: */
{
.url_prefix = "/products",
@@ -949,7 +1001,7 @@ url_handler (void *cls,
in the code... */
.max_upload = 1024 * 1024 * 8
},
- /* GET /products/$ID/: */
+ /* GET /products/$ID: */
{
.url_prefix = "/products/",
.method = MHD_HTTP_METHOD_GET,