Skip to content

feat(helpers): add document archiver#46

Open
itsjgf wants to merge 1 commit into
masterfrom
archive-node
Open

feat(helpers): add document archiver#46
itsjgf wants to merge 1 commit into
masterfrom
archive-node

Conversation

@itsjgf

@itsjgf itsjgf commented Sep 26, 2016

Copy link
Copy Markdown
Member

#42 is necessary in order to merge this PR.

Closes #13


This change is Reviewable

@joshdmiller joshdmiller left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good! I made one comment about a bit of code that I do not think will cause a problem, but is probably unnecessary.

We do need some unit tests, though.

Comment thread src/falcor/transforms/index.js Outdated
export function archiveDocument(collection, _id, userId) {
return this.flatMap(db => {
db = db.mongo.collection(collection);
return Observable.fromPromise(db.findOneAndUpdate(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a flatMap, I don't think you need to call Observable.fromPromise. I think it should detect that it is a promise and resolve it automatically as part of the flatMap.

@itsjgf itsjgf force-pushed the archive-node branch 2 times, most recently from 6cc2c4f to c75afb6 Compare September 27, 2016 22:40

@joshdmiller joshdmiller left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants