summaryrefslogtreecommitdiff
path: root/server/src/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/server.cc')
-rw-r--r--server/src/server.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/server/src/server.cc b/server/src/server.cc
index 815f0db..756539f 100644
--- a/server/src/server.cc
+++ b/server/src/server.cc
@@ -50,6 +50,8 @@
#include "tostring.h"
#include <time.h>
+#include "journal_commit.h"
+
static void send_macro_widget(Widget &widget, TCPSocket &socket, std::string tabs)
{
socket.write(tabs + "<" + widget.type);
@@ -113,14 +115,15 @@ static void connection(TCPSocket &socket)
Macro macro;
parse_macro(commit.macro, macro);
- //parse_macro("example", macro);
-
- macro.format = "Det koster 50$$\\n\\tLinse: ${linse}D\\n"
- "\\y${combo}\\\\\\nHævelse: ${radio}\\n\\n${spl_note}";
std::string resume = resume_parser(macro.format.c_str(), commit);
- printf("%s\n", resume.c_str());
+ std::string journal_commit_addr = config()->lookup("journal_commit_addr");
+ int journal_commit_port = config()->lookup("journal_commit_port");
+
+ journal_commit(transaction.cpr.c_str(), transaction.user.c_str(),
+ journal_commit_addr.c_str(), journal_commit_port,
+ resume.c_str(), resume.length());
i++;
}