Add user state updates and bidding error handling in draft consumers
- Implement user state tracking and broadcasting on connect/disconnect and phase changes - Add bid start and place rejection handling with error messages to frontend and backend - Enhance movie serializer with TMDB integration and update relevant frontend components
This commit is contained in:
@@ -11,6 +11,7 @@ class DraftMessage(StrEnum):
|
||||
USER_JOIN_INFORM = "user.join.inform" # server -> client
|
||||
USER_LEAVE_INFORM = "user.leave.inform"
|
||||
USER_IDENTIFICATION_INFORM = "user.identification.inform" # server -> client (tells socket "you are X", e.g. after connect) # server -> client
|
||||
USER_STATE_INFORM = "user.state.inform"
|
||||
|
||||
# Phase control
|
||||
PHASE_CHANGE_INFORM = "phase.change.inform" # server -> client (target phase payload)
|
||||
@@ -31,8 +32,10 @@ class DraftMessage(StrEnum):
|
||||
# Bidding (examples, adjust to your flow)
|
||||
BID_START_INFORM = "bid.start.inform" # server -> client (movie, ends_at)
|
||||
BID_START_REQUEST = "bid.start.request" # server -> client (movie, ends_at)
|
||||
BID_START_REJECT = "bid.start.reject" # server -> client (movie, ends_at)
|
||||
BID_PLACE_REQUEST = "bid.place.request" # client -> server (amount)
|
||||
BID_PLACE_CONFIRM = "bid.update.confirm" # server -> client (high bid)
|
||||
BID_PLACE_REJECT = "bid.place.reject" # server -> client (high bid)
|
||||
BID_PLACE_CONFIRM = "bid.place.confirm" # server -> client (high bid)
|
||||
BID_UPDATE_INFORM = "bid.update.inform" # server -> client (high bid)
|
||||
BID_END_INFORM = "bid.end.inform" # server -> client (winner)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user