diff options
Diffstat (limited to 'src/signing.erl')
-rw-r--r-- | src/signing.erl | 8 |
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); |