-
Notifications
You must be signed in to change notification settings - Fork 35
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
Hotfix/latestApiBackends subscription - closes #742 #748
Conversation
|
||
// Cursor | ||
instance.latestApiBackendsCursor = function () { | ||
return ApiBackends.find({}, {sort: {created_at: -1}, limit: instance.limit.get()}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add a comment here describing the cursor. Specifically mention the desired result of the sort.created_at
and limit
parts, as they may be unfamiliar to new developers.
// Retrieve 6 last API Backends | ||
var latestApiBackends = ApiBackends.find({}, {sort: {created_at: -1}, limit: 6}).fetch(); | ||
// Retrieve last API Backends | ||
var latestApiBackendsList = instance.latestApiBackendsCursor().fetch(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice variable name. This is helpful when reading through the code.
@brylie Added fixes. |
Hotfix/latestApiBackends subscription - closes #742
Related issue #742