summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorpriscilla <priscilla.huang@efrei.net>2022-12-29 07:14:09 -0500
committerpriscilla <priscilla.huang@efrei.net>2022-12-29 07:14:34 -0500
commit689bbc7a201067815cb0975703422854099d19ba (patch)
treed00d3bc13681f299fc28c9d9bcf595484b36c05d /src/backend
parent99db83bca3b5dbe1399a642eb4192546bbfd24df (diff)
downloadmerchant-689bbc7a201067815cb0975703422854099d19ba.tar.gz
merchant-689bbc7a201067815cb0975703422854099d19ba.tar.bz2
merchant-689bbc7a201067815cb0975703422854099d19ba.zip
using templates testing
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-httpd.c10
-rw-r--r--src/backend/taler-merchant-httpd_post-using-templates.c3
-rw-r--r--src/backend/taler-merchant-httpd_post-using-templates.h5
3 files changed, 15 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
index 01a515b3..9366c1bf 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -77,6 +77,7 @@
#include "taler-merchant-httpd_post-orders-ID-claim.h"
#include "taler-merchant-httpd_post-orders-ID-paid.h"
#include "taler-merchant-httpd_post-orders-ID-pay.h"
+#include "taler-merchant-httpd_post-using-templates.h"
#include "taler-merchant-httpd_post-orders-ID-refund.h"
#include "taler-merchant-httpd_post-tips-ID-pickup.h"
#include "taler-merchant-httpd_reserves.h"
@@ -1149,6 +1150,15 @@ url_handler (void *cls,
.have_id_segment = true,
.handler = &TMH_return_static
},
+ /* POST /templates/$ID: */
+ {
+ .url_prefix = "/templates/",
+ .method = MHD_HTTP_METHOD_POST,
+ .have_id_segment = true,
+ .allow_deleted_instance = true,
+ .handler = &TMH_post_using_templates_ID,
+ .max_upload = 1024 * 1024
+ },
{
.url_prefix = "*",
.method = MHD_HTTP_METHOD_OPTIONS,
diff --git a/src/backend/taler-merchant-httpd_post-using-templates.c b/src/backend/taler-merchant-httpd_post-using-templates.c
index 239549c0..75f489dd 100644
--- a/src/backend/taler-merchant-httpd_post-using-templates.c
+++ b/src/backend/taler-merchant-httpd_post-using-templates.c
@@ -35,7 +35,8 @@
MHD_RESULT
-TMH_post_using_templates_ID (struct MHD_Connection *connection,
+TMH_post_using_templates_ID (const struct TMH_RequestHandler *rh,
+ struct MHD_Connection *connection,
struct TMH_HandlerContext *hc)
{
struct TMH_MerchantInstance *mi = hc->instance;
diff --git a/src/backend/taler-merchant-httpd_post-using-templates.h b/src/backend/taler-merchant-httpd_post-using-templates.h
index 57ca6aa8..7d875bc6 100644
--- a/src/backend/taler-merchant-httpd_post-using-templates.h
+++ b/src/backend/taler-merchant-httpd_post-using-templates.h
@@ -31,8 +31,9 @@
* @return MHD result code
*/
MHD_RESULT
-TMH_post_using_templates_ID (struct MHD_Connection *connection,
- struct TMH_HandlerContext *hc);
+TMH_post_using_templates_ID (const struct TMH_RequestHandler *rh,
+ struct MHD_Connection *connection,
+ struct TMH_HandlerContext *hc);
#endif