Skip to content

Feature/event permission#6

Merged
ohmjess merged 13 commits intoDevelopmentfrom
feature/event-permission
Feb 19, 2025
Merged

Feature/event permission#6
ohmjess merged 13 commits intoDevelopmentfrom
feature/event-permission

Conversation

@boytur
Copy link
Copy Markdown
Member

@boytur boytur commented Feb 19, 2025

This pull request includes significant changes to the backend and frontend of the application, focusing on the handling of polls, user participation, and related services. The most important changes include the removal of the pollId field from the Guest model, the addition of new methods in the PollController and PollService, and updates to the frontend components to reflect these backend changes.

Backend Changes:

  • Database Schema Updates:

    • Removed the pollId field from the Guest model and its related foreign key constraint. (backend/prisma/migrations/20250219021609_/migration.sql, backend/prisma/schema.prisma) [1] [2] [3] [4]
  • Controller Enhancements:

    • Added new methods myPolls, publicPolls, and myVotedPolls to the PollController to handle fetching polls based on user participation and voting status. (backend/src/controllers/poll.controller.ts) [1] [2] [3]
  • Service Enhancements:

    • Introduced new methods in the PollService to support the new controller actions, including myPolls, myVotedPolls, publicPolls, and userCanVote. (backend/src/services/poll.service.ts) [1] [2] [3] [4]
  • Routing Updates:

    • Updated the poll routes to include new endpoints for the newly added controller methods and integrated authentication middleware. (backend/src/routes/poll.routes.ts) [1] [2]

Frontend Changes:

  • Component Updates:
    • Enhanced the Polls and PollCard components to include an EventTag and display event information associated with polls. (frontend/src/components/Polls.tsx) [1] [2]

…uest, VoteRestriction, and Vote tables with relationships and constraints
…s, and public polls with appropriate error handling
…hing user's polls, public polls, and voted polls
…ic polls, and voted polls with loading states
@boytur boytur requested review from LordEaster and ohmjess February 19, 2025 04:37
@ohmjess
Copy link
Copy Markdown
Contributor

ohmjess commented Feb 19, 2025

Look good to me

@ohmjess ohmjess merged commit 05da483 into Development Feb 19, 2025
@boytur boytur deleted the feature/event-permission branch February 25, 2025 14:49
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.

2 participants