aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorpriscilla <priscilla.huang@efrei.net>2022-12-06 09:27:45 -0500
committerpriscilla <priscilla.huang@efrei.net>2022-12-06 09:27:45 -0500
commite90fc21a82c6d58a3fc8154b4a708cb323245ef0 (patch)
treee8f02e6f8de32c69cd5364f6e025799b3f988d34 /src/backend
parentb0a95a941b3d374e19e2f27c57155183315ed4df (diff)
update
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-httpd.c187
1 files changed, 92 insertions, 95 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
index 6dd48ea1..1e3de641 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -931,6 +931,98 @@ url_handler (void *cls,
.allow_deleted_instance = true,
.handler = &TMH_private_get_transfers
},
+ /* POST /templates: */
+ {
+ .url_prefix = "/templates/",
+ .method = MHD_HTTP_METHOD_POST,
+ .handler = &TMH_private_post_templates,
+ /* allow template data of up to 8 MB, that should be plenty;
+ note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB)
+ would require further changes to the allocation logic
+ in the code... */
+ .max_upload = 1024 * 1024 * 8
+ },
+ /* GET /templates: */
+ {
+ .url_prefix = "/templates",
+ .method = MHD_HTTP_METHOD_GET,
+ .handler = &TMH_private_get_templates
+ },
+ /* GET /templates/$ID/: */
+ {
+ .url_prefix = "/templates/",
+ .method = MHD_HTTP_METHOD_GET,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_private_get_templates_ID
+ },
+ /* DELETE /templates/$ID/: */
+ {
+ .url_prefix = "/templates/",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_private_delete_templates_ID
+ },
+ /* PATCH /templates/$ID/: */
+ {
+ .url_prefix = "/templates/",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_private_patch_templates_ID,
+ /* allow template data of up to 8 MB, that should be plenty;
+ note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB)
+ would require further changes to the allocation logic
+ in the code... */
+ .max_upload = 1024 * 1024 * 8
+ },
+ /* GET /webhooks: */
+ {
+ .url_prefix = "/webhooks/",
+ .method = MHD_HTTP_METHOD_GET,
+ .handler = &TMH_private_get_webhooks
+ },
+ /* POST /webhooks: */
+ {
+ .url_prefix = "/webhooks/",
+ .method = MHD_HTTP_METHOD_POST,
+ .handler = &TMH_private_post_webhooks,
+ /* allow webhook data of up to 8 MB, that should be plenty;
+ note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB)
+ would require further changes to the allocation logic
+ in the code... */
+ .max_upload = 1024 * 1024 * 8
+ },
+ /* GET /webhooks/$ID/: */
+ {
+ .url_prefix = "/webhooks/",
+ .method = MHD_HTTP_METHOD_GET,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_private_get_webhooks_ID
+ },
+ /* DELETE /webhooks/$ID/: */
+ {
+ .url_prefix = "/webhooks/",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_private_delete_webhooks_ID
+ },
+ /* PATCH /webhooks/$ID/: */
+ {
+ .url_prefix = "/webhooks/",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_private_patch_webhooks_ID,
+ /* allow webhook data of up to 8 MB, that should be plenty;
+ note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB)
+ would require further changes to the allocation logic
+ in the code... */
+ .max_upload = 1024 * 1024 * 8
+ },
{
.url_prefix = NULL
}
@@ -1062,101 +1154,6 @@ url_handler (void *cls,
.method = MHD_HTTP_METHOD_OPTIONS,
.handler = &handle_server_options
},
- /* GET /templates: */
- {
- .url_prefix = "/templates/",
- .method = MHD_HTTP_METHOD_GET,
- .handler = &TMH_private_get_templates
- },
- /* POST /templates: */
- {
- .url_prefix = "/templates/",
- .method = MHD_HTTP_METHOD_POST,
- .handler = &TMH_private_post_templates,
- /* allow template data of up to 8 MB, that should be plenty;
- note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB)
- would require further changes to the allocation logic
- in the code... */
- .max_upload = 1024 * 1024 * 8
- },
- /* GET /templates/$ID/: */
- {
- .url_prefix = "/templates/",
- .method = MHD_HTTP_METHOD_GET,
- .have_id_segment = true,
- .allow_deleted_instance = true,
- .handler = &TMH_private_get_templates_ID
- },
- /* DELETE /templates/$ID/: */
- {
- .url_prefix = "/templates/",
- .method = MHD_HTTP_METHOD_DELETE,
- .have_id_segment = true,
- .allow_deleted_instance = true,
- .handler = &TMH_private_delete_templates_ID
- },
- /* PATCH /templates/$ID/: */
- {
- .url_prefix = "/templates/",
- .method = MHD_HTTP_METHOD_PATCH,
- .have_id_segment = true,
- .allow_deleted_instance = true,
- .handler = &TMH_private_patch_templates_ID,
- /* allow template data of up to 8 MB, that should be plenty;
- note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB)
- would require further changes to the allocation logic
- in the code... */
- .max_upload = 1024 * 1024 * 8
- },
- {
- .url_prefix = NULL
- },
- /* GET /webhooks: */
- {
- .url_prefix = "/webhooks/",
- .method = MHD_HTTP_METHOD_GET,
- .handler = &TMH_private_get_webhooks
- },
- /* POST /webhooks: */
- {
- .url_prefix = "/webhooks/",
- .method = MHD_HTTP_METHOD_POST,
- .handler = &TMH_private_post_webhooks,
- /* allow webhook data of up to 8 MB, that should be plenty;
- note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB)
- would require further changes to the allocation logic
- in the code... */
- .max_upload = 1024 * 1024 * 8
- },
- /* GET /webhooks/$ID/: */
- {
- .url_prefix = "/webhooks/",
- .method = MHD_HTTP_METHOD_GET,
- .have_id_segment = true,
- .allow_deleted_instance = true,
- .handler = &TMH_private_get_webhooks_ID
- },
- /* DELETE /webhooks/$ID/: */
- {
- .url_prefix = "/webhooks/",
- .method = MHD_HTTP_METHOD_DELETE,
- .have_id_segment = true,
- .allow_deleted_instance = true,
- .handler = &TMH_private_delete_webhooks_ID
- },
- /* PATCH /webhooks/$ID/: */
- {
- .url_prefix = "/webhooks/",
- .method = MHD_HTTP_METHOD_PATCH,
- .have_id_segment = true,
- .allow_deleted_instance = true,
- .handler = &TMH_private_patch_webhooks_ID,
- /* allow webhook data of up to 8 MB, that should be plenty;
- note that exceeding #GNUNET_MAX_MALLOC_CHECKED (40 MB)
- would require further changes to the allocation logic
- in the code... */
- .max_upload = 1024 * 1024 * 8
- },
{
.url_prefix = NULL
}