Fixed problem with sorting.
h3rald h3rald@h3rald.com
Sun, 04 Mar 2018 21:42:52 +0000
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
lib/api_v3.nim
→
lib/api_v3.nim
@@ -42,7 +42,9 @@ """
for f in fragments: var matches = @["", ""] if f.find(clause, matches) != -1: - let field = "json_extract(documents.data, '$1')" % matches[1] + var field = matches[1] + if field[0] == '$': + field = "json_extract(documents.data, '$1')" % matches[1] if matches[0] == "-": clauses.add("$1 DESC" % field) else: