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

add documentation to TeamEventsDao #511

Merged
merged 3 commits into from
Sep 29, 2023

Conversation

alyssayzhang
Copy link
Contributor

Summary

  • adds documentation to the methods in TeamEventsDao.ts

@alyssayzhang alyssayzhang requested a review from a team as a code owner September 29, 2023 05:26
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 21.

@alyssayzhang alyssayzhang changed the title alyssazhang/add documentation to TeamEventsDao add documentation to TeamEventsDao Sep 29, 2023
Copy link
Collaborator

@andrew032011 andrew032011 left a comment

Choose a reason for hiding this comment

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

Looks good. Minor comment. And I think you have a few unclosed single quotes for the Not Found Error.

static async deleteTeamEvent(teamEvent: TeamEventInfo): Promise<void> {
const eventDoc = teamEventsCollection.doc(teamEvent.uuid);
const eventRef = await eventDoc.get();
if (!eventRef.exists) throw new NotFoundError(`No team event '${teamEvent.uuid}' exists.`);
await eventDoc.delete();
}

/**
* Creates a team event
* @param event - newly created TeamEvent object that represent the details of the event
Copy link
Collaborator

@andrew032011 andrew032011 Sep 29, 2023

Choose a reason for hiding this comment

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

nit: TeamEventInfo? Or just write "team event" like you did for the other endpoints to be consistent. The confusion here is that it's now implying that the type of the parameter is TeamEvent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changing it rn to TeamEventInfo!

@alyssayzhang alyssayzhang merged commit 3aa47f9 into main Sep 29, 2023
13 checks passed
@alyssayzhang alyssayzhang deleted the alyssazhang/add-documentation-to-team-events-dao branch September 29, 2023 22:15
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