Fix: actions to have room_id
This commit is contained in:
@ -109,6 +109,7 @@ func HandleShowColor(w http.ResponseWriter, r *http.Request) {
|
||||
fi.Room.IsOver = true
|
||||
fi.Room.TeamWon = oppositeColor
|
||||
action := models.Action{
|
||||
RoomID: fi.Room.ID,
|
||||
Actor: fi.State.Username,
|
||||
ActorColor: string(fi.State.Team),
|
||||
WordColor: models.WordColorBlack,
|
||||
@ -134,6 +135,7 @@ func HandleShowColor(w http.ResponseWriter, r *http.Request) {
|
||||
fi.Room.IsOver = true
|
||||
fi.Room.TeamWon = "blue"
|
||||
action := models.Action{
|
||||
RoomID: fi.Room.ID,
|
||||
Actor: fi.State.Username,
|
||||
ActorColor: string(fi.State.Team),
|
||||
WordColor: models.WordColorBlue,
|
||||
@ -148,6 +150,7 @@ func HandleShowColor(w http.ResponseWriter, r *http.Request) {
|
||||
fi.Room.IsOver = true
|
||||
fi.Room.TeamWon = "red"
|
||||
action := models.Action{
|
||||
RoomID: fi.Room.ID,
|
||||
Actor: fi.State.Username,
|
||||
ActorColor: string(fi.State.Team),
|
||||
WordColor: models.WordColorRed,
|
||||
@ -163,6 +166,7 @@ func HandleShowColor(w http.ResponseWriter, r *http.Request) {
|
||||
fi.Room.IsOver = true
|
||||
fi.Room.TeamWon = fi.State.Team
|
||||
action := models.Action{
|
||||
RoomID: fi.Room.ID,
|
||||
Actor: fi.State.Username,
|
||||
ActorColor: string(fi.State.Team),
|
||||
WordColor: models.WordColorRed,
|
||||
|
Reference in New Issue
Block a user