fix: lookup topic without force percent decode

* the minirest handler would do it
This commit is contained in:
JimMoen 2023-05-24 17:13:18 +08:00
parent 2de2a979f5
commit e38645aa28
No known key found for this signature in database
GPG Key ID: 87A520B4F76BA86D
2 changed files with 3 additions and 2 deletions

View File

@ -139,9 +139,9 @@ lookup(#{topic := Topic}) ->
%%%============================================================================================== %%%==============================================================================================
%% internal %% internal
generate_topic(Params = #{<<"topic">> := Topic}) -> generate_topic(Params = #{<<"topic">> := Topic}) ->
Params#{<<"topic">> => uri_string:percent_decode(Topic)}; Params#{<<"topic">> => Topic};
generate_topic(Params = #{topic := Topic}) -> generate_topic(Params = #{topic := Topic}) ->
Params#{topic => uri_string:percent_decode(Topic)}; Params#{topic => Topic};
generate_topic(Params) -> generate_topic(Params) ->
Params. Params.

View File

@ -0,0 +1 @@
Avoid duplicated percent decode the topic name in API `/topics/{topic}` and `/topics`.