PR feedback, remove collectionId

This commit is contained in:
Tom Moor committed 2017-11-26 18:18:41 -08:00
1 parent 94c2cc09ee
commit 33fea77a86
4 files changed
+2 -4

No files matched your search

-1
View File
@@ -20,7 +20,6 @@ class Document extends BaseModel {
collaborators: Array<User>;
collection: $Shape<Collection>;
collectionId: string;
firstViewedAt: ?string;
lastViewedAt: ?string;
modifiedSinceViewed: ?boolean;
+1 -1
View File
@@ -56,7 +56,7 @@ class DocumentsStore extends BaseStore {
return _.orderBy(
_.filter(
this.data.values(),
document => document.collectionId === collectionId
document => document.collection.id === collectionId
),
'updatedAt',
'desc'
+1 -1
View File
@@ -37,7 +37,7 @@ describe('#documents.list', async () => {
it('should allow filtering by collection', async () => {
const { user, document } = await seed();
const res = await server.post('/api/documents.list', {
body: { token: user.getJwtToken(), collectionId: document.atlasId },
body: { token: user.getJwtToken(), collection: document.atlasId },
});
const body = await res.json();
-1
View File
@@ -36,7 +36,6 @@ async function present(ctx: Object, document: Document, options: ?Options) {
team: document.teamId,
collaborators: [],
starred: !!(document.starred && document.starred.length),
collectionId: document.atlasId,
collaboratorCount: undefined,
collection: undefined,
views: undefined,