Skip to content

Commit

Permalink
make changes to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
leihelen committed Oct 22, 2023
1 parent b2ac82a commit eadc8ab
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions server/endpoints/Profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ export interface ProfileRequest {
}

/**
* [getStudentEmailByToken] returns a student email if the given token is valid
* Returns true if [token] matches the email if the given token is valid and

Check failure on line 18 in server/endpoints/Profile.ts

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
* false otherwise
* This method authenticates the user token through the Google API.
*

Check failure on line 21 in server/endpoints/Profile.ts

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
* @param token: google authentication token that is checked to see if it is not
* empty and an ASCII value
* @requires that you have a handleVerifyError, like as follows:
* verify(token, function(){//do whatever}).catch(function(error)){}
* @returns: Endpoint with type ProfileRequest
*/
export const getStudentEmailByToken: Endpoint<ProfileRequest> = {
guard: [body("token").notEmpty().isAscii()],
Expand All @@ -40,7 +48,11 @@ export const getStudentEmailByToken: Endpoint<ProfileRequest> = {
};

/**
* [countReviewsByStudentId] returns the number of reviews made by a given student id.
* Returns the number of reviews that match a given netId and null if there are none
* This method counts the total number of reviews left by a student.
*

Check failure on line 53 in server/endpoints/Profile.ts

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
* @param netId: netId that is checked to see if it is not empty and an ASCII value
* @returns: Endpoint with type NetIdQuery
*/
export const countReviewsByStudentId: Endpoint<NetIdQuery> = {
guard: [body("netId").notEmpty().isAscii()],
Expand All @@ -64,7 +76,12 @@ export const countReviewsByStudentId: Endpoint<NetIdQuery> = {
};

/**
* [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

Check failure on line 79 in server/endpoints/Profile.ts

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
* netId and error if there are none
* This method counts the total number of likes received by a student.
*

Check failure on line 82 in server/endpoints/Profile.ts

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
* @param netId: netId that is checked to see if it is not empty and an ASCII value
* @returns: Endpoint with type NetIdQuery
*/
export const getTotalLikesByStudentId: Endpoint<NetIdQuery> = {
guard: [body("netId").notEmpty().isAscii()],
Expand Down Expand Up @@ -98,7 +115,12 @@ export const getTotalLikesByStudentId: Endpoint<NetIdQuery> = {
};

/**
* [getReviewsByStudentId] returns a list of review objects that are created by the given student's netID
* Returns the reviews that match the reviewIds associated with a given netId and
* error if there are none
* This method gets all of the reviews created by a student.
*

Check failure on line 121 in server/endpoints/Profile.ts

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
* @param netId: netId that is checked to see if it is not empty and an ASCII value
* @returns: Endpoint with type NetIdQuery
*/
export const getReviewsByStudentId: Endpoint<NetIdQuery> = {
guard: [body("netId").notEmpty().isAscii()],
Expand Down

0 comments on commit eadc8ab

Please sign in to comment.