summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd.c')
-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
}