-
Notifications
You must be signed in to change notification settings - Fork 24
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
Metrics: WorkClaim Counts #627
Conversation
src/API/WorkController.ts
Outdated
async getWorksCountByFilters(worksFilters: WorksFilters = {}): Promise<WorkCount> { | ||
this.logger.trace({ method: 'getByFilters', worksFilters }, 'Getting Work by Filters from DB') | ||
const count = await this.collection.find(worksFilters, { projection: { _id: false } }).count() | ||
return { count } |
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.
Can we just return an integer here instead of an object? It would better match the function name.
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.
Yeah that makes sense. I updated it.
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.
- [no] Tested changes manually
- Checked accidental architectural/style changes
- Reviewed entire diff
- [n/a] Unit tests
- [n/a] Documentation
- Filenames and locations
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
PR Process - PR Review Checklist
Release
Semantic release is enabled for this repository. Make sure you follow the right commit message convention.
We're using semantic-release's default — Angular Commit Message Conventions.
Description of Changes
Resolves #626
API
Router
/metrics
endpointgetWorkCounts
WorkController
getWorksCountByFilters
Notes
Should I include integration/functional tests either in this PR or in an additional one?