Fixed response for POST/PUT requests.
h3rald h3rald@h3rald.com
Fri, 22 May 2015 22:37:05 +0200
1 files changed,
5 insertions(+),
3 deletions(-)
jump to
M
lib/utils.nim
→
lib/utils.nim
@@ -98,17 +98,19 @@ var res = newSeq[tuple[key: string, val: JsonNode]](0)
var count = 0 for s in cols: var key = s + count.inc + if key == "searchable" or key == "binary" or key == "content_type": + continue if s.contains(" "): # documents.id AS id... let chunks = s.split(" ") key = chunks[chunks.len-1] var value:JsonNode - if doc[count] == "": + if doc[count-1] == "": value = newJNull() else: - value = %doc[count] + value = %doc[count-1] res.add((key, value)) - count.inc res.add(("tags", %tags)) return %res