Skip to content

Conversation

@itsjgf
Copy link
Member

@itsjgf itsjgf commented Sep 26, 2016

#42 is necessary in order to merge this PR.

Closes #13


This change is Reviewable

Copy link

@joshdmiller joshdmiller left a comment

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.

export function archiveDocument(collection, _id, userId) {
return this.flatMap(db => {
db = db.mongo.collection(collection);
return Observable.fromPromise(db.findOneAndUpdate(

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
Copy link

@joshdmiller joshdmiller left a comment

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.

3 participants