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

Remove internal properties from POST and PUT payloads #476

Merged
merged 4 commits into from Aug 14, 2018

Conversation

Projects
None yet
2 participants
@eduardoboucas
Copy link
Member

eduardoboucas commented Aug 10, 2018

This PR removes all internal API properties when creating or updating documents.

@eduardoboucas eduardoboucas requested a review from jimlambie Aug 10, 2018

@@ -10,6 +10,7 @@ const Hook = require('./../hook')
* @param {Object|Array} documents - the document(s) to insert
* @param {Object} internals - internal properties to attach to documents
* @param {Boolean} rawOutput - whether to bypass formatting routine
* @param {String} removeInternalProperties - removes internal properties

This comment has been minimized.

@jimlambie

jimlambie Aug 10, 2018

Member

Should type be Boolean?

Also... "whether to remove internal properties" rather than "removes internal properties" ?

This comment has been minimized.

@eduardoboucas

eduardoboucas Aug 10, 2018

Author Member

My bad. Updated in both cases. Thanks!

@@ -38,6 +38,7 @@ const logger = require('@dadi/logger')
* @param {Object} update - properties to update documents with
* @param {Object} internals - internal properties to inject in documents
* @param {Boolean} rawOutput - whether to bypass output formatting
* @param {String} removeInternalProperties - removes internal properties

This comment has been minimized.

@jimlambie

jimlambie Aug 10, 2018

Member

As previous

@jimlambie

This comment has been minimized.

Copy link
Member

jimlambie commented Aug 10, 2018

LGTM 🌮

@eduardoboucas eduardoboucas merged commit ab380ac into develop Aug 14, 2018

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.04%) to 89.621%
Details
security/snyk - package.json (DADI) No new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment