Fix sorting bug in API
This commit is contained in:
1 parent
fe8e782e9f
commit
4bede83ccd
1 file changed
+8
-1
+8
-1
@@ -421,7 +421,14 @@ listener = (request, response) ->
|
||||
sort = {}
|
||||
for k,v of s
|
||||
if aliases[k]?
|
||||
sort[a] = v for a in aliases[k]
|
||||
for a in aliases[k]
|
||||
if a[a.lastIndexOf('.')+1] != '_' and collectionName is 'devices'
|
||||
sort["#{a}._value"] = v
|
||||
else
|
||||
sort[a] = v
|
||||
else
|
||||
if k[k.lastIndexOf('.') + 1] != '_' and collectionName is 'devices'
|
||||
sort["#{k}._value"] = v
|
||||
else
|
||||
sort[k] = v
|
||||
cur.sort(sort)
|
||||
|
||||
Reference in new issue
Block a user