-
Notifications
You must be signed in to change notification settings - Fork 2
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 documentation for memberUtils #571
Conversation
[diff-counting] Significant lines: 24. |
* Computes the differences between the currently approved members and the | ||
* members who've submitted changes to their profiles. | ||
* @param allApprovedMembersList - the list of all approved members. | ||
* @param allLatestMembersList - the list of all members who've submitted changes. |
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.
Or is this just all the non-approved member data for all members? I.e. some members in this array could be the same as the member in the approvedMembersList?
I'd double check this docstring.
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.
I think allLatestMembersList
is the list of members coming from members
and allApprovedMembersList
is just the list of members coming from approved-members
.
I would really suggest not documenting this file purely for the sake of adding documentation 🙃 cc: @andrew032011 |
@@ -15,6 +26,11 @@ export const filterImagesResponse = ( | |||
fileName: image.fileName.slice(image.fileName.indexOf('/') + 1) | |||
})); | |||
|
|||
/** | |||
* Serialize an `IdolMember` from a Firestore document reference. |
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.
* Serialize an `IdolMember` from a Firestore document reference. | |
* Materialize an `IdolMember` from a Firestore document reference. |
/** | ||
* Filters the response from Google Cloud Storage to only include the filename | ||
* of the image. | ||
* @param images - a list of image filenmaes and their URLs. | ||
* @returns a list of profile images. | ||
*/ |
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.
I'd make this more descriptive of what the filename (does it contain the full path, does it contain the file extension, what file extensions are there, etc) looks like and what the purpose of the URL is.
@@ -15,6 +26,11 @@ export const filterImagesResponse = ( | |||
fileName: image.fileName.slice(image.fileName.indexOf('/') + 1) | |||
})); | |||
|
|||
/** | |||
* Serialize an `IdolMember` from a Firestore document reference. |
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.
This should really also mention how this will lookup members from the members archive if the member isn't found in the db and will return undefined if the member doesn't exist in the db or the members archive.
* Computes the differences between the currently approved members and the | ||
* members who've submitted changes to their profiles. | ||
* @param allApprovedMembersList - the list of all approved members. | ||
* @param allLatestMembersList - the list of all members who've submitted changes. |
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.
I think allLatestMembersList
is the list of members coming from members
and allApprovedMembersList
is just the list of members coming from approved-members
.
* Filters the response from Google Cloud Storage to only include the filename | ||
* of the image. | ||
* @param images - a list of image filenmaes and their URLs. | ||
* @returns a list of profile images. |
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.
* @returns a list of profile images. | |
* @returns An array containing metadata about all member profile images. |
Summary
This PR adds some documentation for
memberUtils
in the IDOL backend.