Optional update parameter + user/item namespace#41
Open
gabriel-alecu wants to merge 12 commits intoguymorita:masterfrom
Open
Optional update parameter + user/item namespace#41gabriel-alecu wants to merge 12 commits intoguymorita:masterfrom
gabriel-alecu wants to merge 12 commits intoguymorita:masterfrom
Conversation
added 7 commits
March 27, 2016 04:32
In order to avoid conflicts
Especially when user data updates are disabled
2fddc96 to
3709adb
Compare
magnusburton
approved these changes
Nov 15, 2017
| //make the update parameter optional while still allowing the callback to be last (for readability) | ||
| if (typeof update == 'function') { | ||
| callback = update; | ||
| update = true; |
There was a problem hiding this comment.
Why not make use of ES6's default parameters?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added an optional parameter to liked/disliked, so you can add multiple ratings without having to re-calculate the user recommendations every time:
Manual updates with:
raccoon.updateUser(userId, callback);and
raccoon.updateItem(itemId, callback);Also, added separate namespaces for users & items (#42)
And I got tired of seeing so many failed Travis builds, so I tried to fix that.
But I had to give up on mochacov:coverage. Couldn't find a quick fix, and I don't have any experience with it.