fix
This commit is contained in:
parent
eaa7df3bae
commit
0dec0c9fcf
@ -86,16 +86,15 @@ read_body(Req, AccData) ->
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
%% 向用户推送数据
|
||||
handle_request("POST", "/api/push", #{<<"env">> := <<"prod">>}, Notifications) ->
|
||||
{ok, Pid} = dimension_apn_worker:start_link(apns_prod),
|
||||
handle_request("POST", "/api/push", GetParams, Notifications) ->
|
||||
Profile = case maps:get(<<"env">>, GetParams, <<"prod">>) of
|
||||
<<"prod">> ->
|
||||
apns_prod;
|
||||
<<"dev">> ->
|
||||
apns_dev
|
||||
end,
|
||||
{ok, Pid} = dimension_apn_worker:start_link(Profile),
|
||||
dimension_apn_worker:push(Pid, Notifications),
|
||||
|
||||
{ok, 200, dimension_utils:json_data(<<"success">>)};
|
||||
|
||||
handle_request("POST", "/api/push", _, Notifications) ->
|
||||
{ok, Pid} = dimension_apn_worker:start_link(apns_dev),
|
||||
dimension_apn_worker:push(Pid, Notifications),
|
||||
|
||||
{ok, 200, dimension_utils:json_data(<<"success">>)};
|
||||
|
||||
handle_request(_, Path, _, _) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user