Fix table sorting: URLs now end with /, even the queries

This commit is contained in:
Badlop 2021-05-21 12:57:45 +02:00
parent 65a37864ff
commit dcf8189cb0
1 changed files with 1 additions and 1 deletions

View File

@ -1219,7 +1219,7 @@ get_sort_query(Q) ->
end.
get_sort_query2(Q) ->
{value, {_, Binary}} = lists:keysearch(<<"sort">>, 1, Q),
Integer = binary_to_integer(Binary),
Integer = binary_to_integer(lists:nth(1, binary:split(Binary, <<"/">>))),
case Integer >= 0 of
true -> {ok, {normal, Integer}};
false -> {ok, {reverse, abs(Integer)}}