From f117a57be60742a986361b8785e4fba1c256af8e Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Sun, 24 Dec 2023 16:06:02 +0800 Subject: [PATCH] fix token --- apps/iot/src/iot_api.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/iot/src/iot_api.erl b/apps/iot/src/iot_api.erl index 8ae4f92..0383f5f 100644 --- a/apps/iot/src/iot_api.erl +++ b/apps/iot/src/iot_api.erl @@ -71,14 +71,14 @@ handle_call(_Request, _From, State = #state{}) -> {stop, Reason :: term(), NewState :: #state{}}). handle_cast({ai_event, Id}, State = #state{}) -> spawn_monitor(fun() -> - Sign = iot_util:md5(<>), + Token = iot_util:md5(<>), {ok, Url} = application:get_env(iot, api_url), Headers = [ {<<"content-type">>, <<"application/json">>} ], ReqData = #{ - <<"sign">> => Sign, + <<"token">> => Token, <<"id">> => Id }, Body = iolist_to_binary(jiffy:encode(ReqData, [force_utf8])),