summaryrefslogtreecommitdiff
path: root/src/signing.erl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2015-11-13 16:01:09 +0100
committerLinus Nordberg <linus@nordu.net>2015-11-13 16:01:09 +0100
commitac53699656776f3fe8757e4fe96d1101c5c56681 (patch)
tree4bf061f8a8be3c9a9cc131c1db3a29dfae0564fc /src/signing.erl
parent6eda14bd23c8bdf5ea2064ee9a9c8e92718c5176 (diff)
Follow catlfish change in how request() is being called.parametrise_url
Diffstat (limited to 'src/signing.erl')
-rw-r--r--src/signing.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/signing.erl b/src/signing.erl
index eedf8f7..86ccb88 100644
--- a/src/signing.erl
+++ b/src/signing.erl
@@ -5,9 +5,11 @@
-module(signing).
%% API (URL)
--export([request/3]).
+-export([request/4]).
-request(post, "plop/v1/signing/sct", Input) ->
+-define(APPURL_PLOP_SIGNING, "plop/v1/signing").
+
+request(post, ?APPURL_PLOP_SIGNING, "sct", Input) ->
case (catch mochijson2:decode(Input)) of
{error, E} ->
html("sendentry: bad input:", E);
@@ -17,7 +19,7 @@ request(post, "plop/v1/signing/sct", Input) ->
Result = sign:sign_sct(Data),
success({[{result, base64:encode(Result)}]})
end;
-request(post, "plop/v1/signing/sth", Input) ->
+request(post, ?APPURL_PLOP_SIGNING, "sth", Input) ->
case (catch mochijson2:decode(Input)) of
{error, E} ->
html("sendentry: bad input:", E);