halifier-sequelize
Advanced tools
Comparing version
{ | ||
"name": "halifier-sequelize", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "sequelize adapters for halifier library", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -24,4 +24,7 @@ const R = require('ramda') | ||
if (listMeta.order) { | ||
const direction = (listMeta.direction && listMeta.direction === 'desc') ? 'DESC' : 'ASC' | ||
query.order = [[listMeta.order, direction]]; | ||
query.order = listMeta.order.map(fieldOrder => { | ||
const field = R.nth(0, R.keys(fieldOrder)) | ||
return [field, String(fieldOrder[field]).toUpperCase()] | ||
}) | ||
.filter(R.nth(0)) | ||
} | ||
@@ -28,0 +31,0 @@ |
Sorry, the diff of this file is not supported yet
4438
1.67%95
3.26%