Chore: remove seconds tracking inside of settings
This commit is contained in:
@ -40,22 +40,11 @@ func HandleCreateRoom(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
fi.State.RoomID = &room.ID
|
||||
fi.Room = room
|
||||
// if err := repo.RoomCreate(r.Context(), room); err != nil {
|
||||
// log.Error("failed to create a room", "error", err)
|
||||
// abortWithError(w, err.Error())
|
||||
// return
|
||||
// }
|
||||
if err := repo.PlayerSetRoomID(r.Context(), fi.State.Username, room.ID); err != nil {
|
||||
if err := repo.PlayerSetRoomID(r.Context(), room.ID, fi.State.Username); err != nil {
|
||||
log.Error("failed to set room id", "error", err)
|
||||
abortWithError(w, err.Error())
|
||||
return
|
||||
}
|
||||
// if err := saveFullInfo(r.Context(), fi); err != nil {
|
||||
// msg := "failed to set current room to session"
|
||||
// log.Error(msg, "error", err)
|
||||
// abortWithError(w, msg)
|
||||
// return
|
||||
// }
|
||||
notify(models.NotifyRoomListUpdate, "")
|
||||
tmpl, err := template.ParseGlob("components/*.html")
|
||||
if err != nil {
|
||||
@ -348,7 +337,6 @@ func HandleGiveClue(w http.ResponseWriter, r *http.Request) {
|
||||
fi.Room.ThisTurnLimit = 9
|
||||
}
|
||||
fi.Room.OpenedThisTurn = 0
|
||||
fi.Room.Settings.TurnSecondsLeft = fi.Room.Settings.RoundTime
|
||||
StartTurnTimer(fi.Room.ID, time.Duration(fi.Room.Settings.RoundTime)*time.Second)
|
||||
log.Debug("given clue", "clue", clue, "limit", fi.Room.ThisTurnLimit)
|
||||
notify(models.NotifyBacklogPrefix+fi.Room.ID, clue+num)
|
||||
|
Reference in New Issue
Block a user