summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-08-16 14:06:46 +0200
committerChristian Grothoff <christian@grothoff.org>2022-08-16 14:06:46 +0200
commitc1d0a7d2e64fd7c6bd041a5259cf212b3aabd414 (patch)
tree8b5c4d05187336048f13c1e500501f6e6bbda727 /src/backend/taler-merchant-httpd.c
parent19010a2f6d658e78ded8abb02995d9154d22bbf3 (diff)
downloadmerchant-c1d0a7d2e64fd7c6bd041a5259cf212b3aabd414.tar.gz
merchant-c1d0a7d2e64fd7c6bd041a5259cf212b3aabd414.tar.bz2
merchant-c1d0a7d2e64fd7c6bd041a5259cf212b3aabd414.zip
-move templating logic to libtalertemplating of exchange
Diffstat (limited to 'src/backend/taler-merchant-httpd.c')
-rw-r--r--src/backend/taler-merchant-httpd.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
index d5bc19d6..d95dafdc 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -25,6 +25,7 @@
#include <taler/taler_dbevents.h>
#include <taler/taler_bank_service.h>
#include <taler/taler_mhd_lib.h>
+#include <taler/taler_templating_lib.h>
#include <taler/taler_exchange_service.h>
#include "taler-merchant-httpd_auditors.h"
#include "taler-merchant-httpd_config.h"
@@ -70,7 +71,7 @@
#include "taler-merchant-httpd_reserves.h"
#include "taler-merchant-httpd_spa.h"
#include "taler-merchant-httpd_statics.h"
-#include "taler-merchant-httpd_templating.h"
+
/**
* Fixme: document.
@@ -306,6 +307,7 @@ do_shutdown (void *cls)
GNUNET_CONTAINER_multihashmap_destroy (TMH_by_id_map);
TMH_by_id_map = NULL;
}
+ TALER_TEMPLATING_done ();
}
@@ -1140,7 +1142,7 @@ url_handler (void *cls,
MHD_HTTP_METHOD_HEAD))
method = MHD_HTTP_METHOD_GET; /* MHD will deal with the rest */
-
+
/* Find out the merchant backend instance for the request.
* If there is an instance, remove the instance specification
* from the beginning of the request URL. */
@@ -1443,12 +1445,12 @@ url_handler (void *cls,
&hc->instance->auth.auth_salt,
&hc->instance->auth.auth_hash));
else /* Are the credentials provided OK for CLI override? */
- auth_ok |= ( use_default &&
- (NULL != TMH_default_auth) &&
- (NULL != auth) &&
- (! auth_malformed) &&
- (0 == strcmp (auth,
- TMH_default_auth)) );
+ auth_ok |= (use_default &&
+ (NULL != TMH_default_auth) &&
+ (NULL != auth) &&
+ (! auth_malformed) &&
+ (0 == strcmp (auth,
+ TMH_default_auth)) );
if (! auth_ok)
{
if (auth_malformed)
@@ -1778,7 +1780,7 @@ run (void *cls,
"merchant",
"FORCE_AUDIT"))
TMH_force_audit = GNUNET_YES;
- TMH_templating_init ();
+ TALER_TEMPLATING_init ("merchant");
if (GNUNET_OK !=
TMH_spa_init ())
{