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

Update backend #7

Merged
merged 5 commits into from
Apr 12, 2024
Merged

Update backend #7

merged 5 commits into from
Apr 12, 2024

Conversation

yourvivian
Copy link
Collaborator

Description

  • Added a trip name field for users to specify names for their trips.
  • Updated the trip image field to be optional.
  • Updated the router to include CRUD operations for trips.
  • Updated package.json to change the main file to src/server.ts and added TypeScript dependencies.
  • Updated package-lock.json with new dependencies.

@yourvivian yourvivian self-assigned this Apr 5, 2024
backend/package.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@nickbar01234 nickbar01234 left a comment

Choose a reason for hiding this comment

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

Changes look good so far! A couple of details to consider about:

  1. Determine whether a package should be in dependencies or devDependencies
  2. Potentially updating schema.prisma
  • A trip has many activities, so we should reflect that relationship here. You may find this helpful
  • When we delete a trip or modify it, we need to ensure that all the relationships are properly updated.
  • For a 1-to-many relationship, deleting a trip means that all associated activities should be deleted. The native way to do it using Prisma is with referential action
  • This means that if you allow PUT /trips/:id to modify activities and participants, you should check whether the relationship is consistent after the API call.

Copy link
Owner

@trihoang0809 trihoang0809 left a comment

Choose a reason for hiding this comment

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

LGTM!

@yourvivian yourvivian removed the request for review from nickbar01234 April 11, 2024 06:21
@tranguv tranguv dismissed nickbar01234’s stale review April 12, 2024 00:46

Change requested has been opened in a new Github issue.

@yourvivian yourvivian merged commit d21b10d into main Apr 12, 2024
@yourvivian yourvivian deleted the van-update-backend branch April 12, 2024 00:48
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