summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_templating.h
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-08-21 14:22:15 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-08-21 14:22:15 +0530
commit1684fc64333b97aee8e6128e96ff4920e494e2e0 (patch)
tree11957fa2cb9aa1b09191a92a96a57d8b9902abcc /src/backend/taler-merchant-httpd_templating.h
parent0a5308e71e7f65a9921d74e8d55b389654defca6 (diff)
downloadmerchant-1684fc64333b97aee8e6128e96ff4920e494e2e0.tar.gz
merchant-1684fc64333b97aee8e6128e96ff4920e494e2e0.tar.bz2
merchant-1684fc64333b97aee8e6128e96ff4920e494e2e0.zip
replace key-value templating with JSON templating
Diffstat (limited to 'src/backend/taler-merchant-httpd_templating.h')
-rw-r--r--src/backend/taler-merchant-httpd_templating.h22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/backend/taler-merchant-httpd_templating.h b/src/backend/taler-merchant-httpd_templating.h
index e3c9d53e..6f22e791 100644
--- a/src/backend/taler-merchant-httpd_templating.h
+++ b/src/backend/taler-merchant-httpd_templating.h
@@ -23,25 +23,9 @@
#include <microhttpd.h>
-/**
- * Entry in a key-value array we use as the mustach closure.
- */
-struct KVC
-{
- /**
- * A name, used as the key. NULL for the last entry.
- */
- const char *name;
-
- /**
- * 0-terminated string value to return for @e name.
- */
- const char *value;
-};
-
/**
- * Load a @a template and substitute using @a kvc, returning
+ * Load a @a template and substitute using @a root, returning
* the result to the @a connection with the given
* @a http_status code.
*
@@ -49,7 +33,7 @@ struct KVC
* @param http_status code to use on success
* @param template basename of the template to load
* @param taler_uri value for "Taler:" header to set, or NULL
- * @param kvc key value pairs to fill in
+ * @param root JSON object to pass as the root context
* @return #GNUNET_OK on success (reply queued), #GNUNET_NO if an error was queued,
* #GNUNET_SYSERR on failure (to queue an error)
*/
@@ -58,7 +42,7 @@ TMH_return_from_template (struct MHD_Connection *connection,
unsigned int http_status,
const char *template,
const char *taler_uri,
- const struct KVC *kvc);
+ json_t *root);
/**
* Preload templates.