diff options
author | priscilla <priscilla.huang@efrei.net> | 2022-11-21 11:31:44 -0500 |
---|---|---|
committer | priscilla <priscilla.huang@efrei.net> | 2022-11-22 08:14:50 -0500 |
commit | ae6d2de1610ceb06e58b945a04a3d184b95d3e44 (patch) | |
tree | 8e2a7640b7b2e4e9de5f6f706a93bc7f94e0d54c /src/backend/taler-merchant-httpd.c | |
parent | 01939fd2f0bf4f6ef3fa1c44b6ff39a981613259 (diff) | |
download | merchant-ae6d2de1610ceb06e58b945a04a3d184b95d3e44.tar.gz merchant-ae6d2de1610ceb06e58b945a04a3d184b95d3e44.tar.bz2 merchant-ae6d2de1610ceb06e58b945a04a3d184b95d3e44.zip |
update
Diffstat (limited to 'src/backend/taler-merchant-httpd.c')
-rw-r--r-- | src/backend/taler-merchant-httpd.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index 67359ece..631f4e1a 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c @@ -1056,6 +1056,52 @@ 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 } |