Skip to content

Add event model updates and status transition API#69

Open
rxmox wants to merge 2 commits intobackendfrom
event-model-updates
Open

Add event model updates and status transition API#69
rxmox wants to merge 2 commits intobackendfrom
event-model-updates

Conversation

@rxmox
Copy link
Collaborator

@rxmox rxmox commented Mar 2, 2026

Summary

  • Add gameType (enum: 'Name Bingo', required) and eventImg (optional string) fields to the Event model
  • Change currentState from a free-form string to a validated enum ('Upcoming', 'In Progress', 'Completed') with default 'Upcoming'
  • Add PUT /api/events/:eventId/status endpoint for host-only event lifecycle transitions (Upcoming → In Progress → Completed), with Pusher event-started / event-ended real-time events

rxmox added 2 commits March 2, 2026 12:01
- Add gameType (enum: 'Name Bingo', required) and eventImg (optional) to Event schema
- Change currentState from free-form string to validated enum ('Upcoming', 'In Progress', 'Completed') with default 'Upcoming'
- Add PUT /api/events/:eventId/status endpoint for host-only status transitions
- Emit Pusher event-started/event-ended events on status changes
- Update API reference, database schema, event lifecycle, and real-time events docs
The catch block was returning 500 for all errors, including Mongoose
ValidationError (e.g., missing or invalid gameType). Now checks for
ValidationError by name and returns 400 instead.
@rxmox rxmox requested review from keeryn04 and lnqminh3003 March 2, 2026 19:18
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