Skip to content
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

Use getPublicProfile in leaderboard API #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexanderqchen
Copy link
Contributor

Issue: #29

@alexanderqchen
Copy link
Contributor Author

I removed the eslint rule to allow for changing function parameters. My reasoning for this was that 1. express requires you to change the properties of the parameters (i.e. req.send()) 2. limit and offset parameters are changed widely in the codebase.

Let me know if you disagree with these rule changes. I'm also open to only allowing property changes in the parameters (which can also be done with eslint).

@@ -12,5 +12,6 @@ module.exports = {
},
rules: {
"no-plusplus": "off",
"no-param-reassign": "off"

Choose a reason for hiding this comment

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

Don't turn this off! Instead, for all files where linter complains about this, we can use the following method:

Attendance.getCommitteeLeaderboard = (committee, _offset, _limit) => {
    let offset = _offset;
    let limit = _limit;
}

Choose a reason for hiding this comment

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

@nkansal96 thoughts on this? ^^

Copy link
Contributor

Choose a reason for hiding this comment

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

I think let's go with allowing property changes in the request parameters. Normally, what @HirdayGupta suggested is the way to go, but given that we're also dealing with express it would be better to also allow property changes.

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.

3 participants