Fixed ordering issue on dashboard

This commit is contained in:
Jori Lallo
2016-08-21 23:40:57 -07:00
parent 16436dc9af
commit e7301aeb3e
2 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
import Router from 'koa-router';
import httpErrors from 'http-errors';
import _orderBy from 'lodash.orderby';
import _ from 'lodash';
import auth from './authentication';
import pagination from './middlewares/pagination';
@@ -71,7 +71,7 @@ router.post('collections.list', auth(), pagination(), async (ctx) => {
return data.push(await presentCollection(ctx, atlas, true));
}));
data = _orderBy(data, ['updatedAt'], ['desc']);
data = _.orderBy(data, ['updatedAt'], ['desc']);
ctx.body = {
pagination: ctx.state.pagination,