Skip to content

send projection information to the readSnapshot middleware #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dcharbonnier
Copy link

fix share#234

@@ -82,6 +82,9 @@ Backend.prototype._shimDocAction = function() {
this.use(this.MIDDLEWARE_ACTIONS.readSnapshots, function(request, callback) {
async.each(request.snapshots, function(snapshot, eachCb) {
var docRequest = {collection: request.collection, id: snapshot.id, snapshot: snapshot};
if(request.projection) {
Copy link
Author

Choose a reason for hiding this comment

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

sharedb-access expect an index property and use the deprecated doc middleware

@coveralls
Copy link

coveralls commented Aug 1, 2018

Pull Request Test Coverage Report for Build 98

  • 17 of 18 (94.44%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 92.454%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/query-emitter.js 3 4 75.0%
Totals Coverage Status
Change from base Build 98: 0.03%
Covered Lines: 2585
Relevant Lines: 2690

💛 - Coveralls

Copy link

@curran curran left a comment

Choose a reason for hiding this comment

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

It's not totally clear what problem this solves. The description in the issue mentions "correctly setup authorizations", but how does this change solve that problem?

Adding tests to cover the changes here would be good to do.

CI is currently failing on this PR.

@@ -1,7 +1,7 @@
var json0 = require('ot-json0').type;

exports.projectSnapshot = projectSnapshot;
exports.projectSnapshots = projectSnapshots;
exports.projectsSnapshots = projectsSnapshots;
Copy link

Choose a reason for hiding this comment

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

Why rename this?

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.

middleware readSnapshots loosing projection information
3 participants