-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add profile documentation #412
Conversation
[diff-counting] Significant lines: 26. |
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.
Hey Helen, nice job addressing the changes that Michelle requested. I noticed that you just have some things in the docstrings that might not be totally correct. For some of the docstrings, you state that the function will throw an error "if there are none", but this isn't necessarily accurate. For example. getTotalLikesByStudentId will just return a message with totalLikes = 0 and not throw an error. Did you mean if the findOne methods didn't find a document, then they would return null, or it would error if let's say the netId did not exist?
server/endpoints/Profile.ts
Outdated
* [getTotalLikesByStudentId] returns the total number of likes a student has gotten on their reviews | ||
* Returns the number of likes that match the reviewIds associated with a given | ||
* netId and error if there are none | ||
* This method counts the total number of likes received by a student. |
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.
hey Helen, nice work! I think here we should change "This method counts the total number of likes received by a student."
to "This method calculates the total number of likes a student has received on all their reviews."
to be a little more clear
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 being a little bit nitpicky here, but it seems like some of the docstrings have redundant information. For example, countReviewsByStudentId states what the function does twice in the first three lines.
changed the documentation in Profile.ts