Refactor, paginate on scroll

New PaginatedDocumentList component
This commit is contained in:
Tom Moor
2018-08-10 23:03:47 -07:00
parent 266b4d735c
commit d308442fef
8 changed files with 152 additions and 95 deletions

View File

@@ -19,7 +19,7 @@ router.post('documents.list', auth(), pagination(), async ctx => {
let where = { teamId: ctx.state.user.teamId };
if (collection) where = { ...where, collectionId: collection };
if (user) where = { ...where, userId: collection };
if (user) where = { ...where, createdById: user };
const starredScope = { method: ['withStarred', ctx.state.user.id] };
const documents = await Document.scope('defaultScope', starredScope).findAll({