Fix: save action on give-clue
This commit is contained in:
		| @@ -329,6 +329,7 @@ func HandleGiveClue(w http.ResponseWriter, r *http.Request) { | ||||
| 	} | ||||
| 	// === | ||||
| 	action := models.Action{ | ||||
| 		RoomID:     fi.Room.ID, | ||||
| 		Actor:      fi.State.Username, | ||||
| 		ActorColor: string(fi.State.Team), | ||||
| 		WordColor:  string(fi.State.Team), | ||||
| @@ -337,6 +338,10 @@ func HandleGiveClue(w http.ResponseWriter, r *http.Request) { | ||||
| 		Number:     num, | ||||
| 	} | ||||
| 	fi.Room.ActionHistory = append(fi.Room.ActionHistory, action) | ||||
| 	if err := repo.CreateAction(r.Context(), &action); err != nil { | ||||
| 		abortWithError(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
| 	fi.Room.MimeDone = true | ||||
| 	fi.Room.ThisTurnLimit = uint8(guessLimitU64) + 1 | ||||
| 	if guessLimitU64 == 0 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder