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