Set asc as default

This commit is contained in:
Jim Laurie 2018-04-30 17:48:43 +02:00
parent f91be5ce63
commit ba16a0b7c5

View File

@ -454,7 +454,7 @@ module.exports = {
if (_.includes(['_start', '_limit'], key)) {
result = convertor(value, key);
} else if (key === '_sort') {
const [attr, order] = value.split(':');
const [attr, order = 'ASC'] = value.split(':');
result = convertor(order, key, attr);
} else {
const suffix = key.split('_');