add sign
This commit is contained in:
parent
ac6ea78aa4
commit
766ac31b4f
@ -30,6 +30,7 @@ init(Req0, Opts) ->
|
||||
}, Resp, Req1),
|
||||
{ok, Req2, Opts};
|
||||
false ->
|
||||
lager:debug("[api_handler] invalid sign: ~p", [Sign]),
|
||||
Req2 = cowboy_req:reply(500, #{
|
||||
<<"Content-Type">> => <<"text/html;charset=utf-8">>
|
||||
}, <<"Internal Server Error">>, Req1),
|
||||
@ -39,7 +40,7 @@ init(Req0, Opts) ->
|
||||
handle_request("POST", "/api/device_info", _, Params) ->
|
||||
njau_bot_logger:write(jiffy:encode(Params, [force_utf8])),
|
||||
|
||||
{ok, 200, json_data(<<"hello world">>)};
|
||||
{ok, 200, json_data(<<"ok">>)};
|
||||
|
||||
handle_request(_, Path, _, _) ->
|
||||
Path1 = list_to_binary(Path),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user