fix(auth mnesia api): fix the issue of missing line breaks in multi-line rules

This commit is contained in:
zhanghongtong 2021-09-14 16:38:39 +08:00 committed by Rory Z
parent a45cbf504b
commit ca4b1ca3b5
1 changed files with 2 additions and 2 deletions

View File

@ -302,7 +302,7 @@ sources(get, _) ->
{ok, Rules} ->
lists:append(AccIn, [#{type => file,
enable => Enable,
rules => iolist_to_binary([io_lib:format("~p.", [R]) || R <- Rules]),
rules => iolist_to_binary([io_lib:format("~p.\n", [R]) || R <- Rules]),
annotations => #{status => healthy}
}]);
{error, _} ->
@ -360,7 +360,7 @@ source(get, #{bindings := #{type := Type}}) ->
{ok, Rules} ->
{200, #{type => file,
enable => Enable,
rules => iolist_to_binary([io_lib:format("~p.", [R]) || R <- Rules]),
rules => iolist_to_binary([io_lib:format("~p.\n", [R]) || R <- Rules]),
annotations => #{status => healthy}
}
};