-
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 to TeamEventsDao #511
add documentation to TeamEventsDao #511
Conversation
[diff-counting] Significant lines: 21. |
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.
Looks good. Minor comment. And I think you have a few unclosed single quotes for the Not Found Error
.
backend/src/dao/TeamEventsDao.ts
Outdated
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 |
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.
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
.
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.
changing it rn to TeamEventInfo
!
Summary
TeamEventsDao.ts