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

Amelia tomas/event schema #9

Merged
merged 8 commits into from
Oct 26, 2024
Merged

Amelia tomas/event schema #9

merged 8 commits into from
Oct 26, 2024

Conversation

abermack
Copy link
Collaborator

Description

Created Event Schema, made the POST, PUT, and DELETE.

Issues

No issues!

Screenshots

Backend - no screenshots.

Test

Use the button.tsx to test our methods.

Possible Downsides

We weren't sure about the Partial Event on the client side.

Additional Documentations

@@ -0,0 +1,39 @@
// TO RUN: npx ts-node scripts/eventTest.ts
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you guys delete this file from the PR? I think ideally we wanna only keep files that the webapp will need (so omit testing files)

},
},
});
// const response2 = await deleteEvent({
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: remove the commented-out testing

// DateTime: Date;
// };
export const addEvent = async (request: {
body: { event: Partial<Event> };
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of Partial I think we should use the Pick keyword in TypeScript so we can make things more specific like this:

type CreateEventInput = Pick<Event, "EventName" | "Description" | "MaxPeople" | "DateTime">

Copy link
Collaborator

@wkim10 wkim10 left a comment

Choose a reason for hiding this comment

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

Great work guys once you make the changes I wrote down feel free to merge!

@abermack abermack merged commit 5f1b739 into main Oct 26, 2024
1 check failed
@abermack abermack deleted the amelia-tomas/eventSchema branch October 26, 2024 22:00
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