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

Modify create event endpoint to accept a list of DrinkActions #16

Closed
Tschonti opened this issue May 24, 2024 · 0 comments · Fixed by #32
Closed

Modify create event endpoint to accept a list of DrinkActions #16

Tschonti opened this issue May 24, 2024 · 0 comments · Fixed by #32
Assignees
Labels

Comments

@Tschonti
Copy link
Member

Tschonti commented May 24, 2024

When the user creates an event, they should have the option to add the drinkActions to that event. So a CreateDrinkActionDto[] (except there is no need for the eventId field on the drinkAction dto. find a nice way of removing that field) field should be on the CreateEventDto. The list can be empty, but use classvalidator to validate the nested object.
Modify the create method of event service to create both the event and the drinkactions (prisma docs)

There's no need to modify the update endpoint, the POST/PATCH/DELETE endpoints of the DrinkAction controller can be used to modify the drinkActions of an event once it's created.

depends on #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants