Fix: mime to see marks; reverse actions order; hide endturn button
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"os"
|
||||
"slices"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -55,6 +57,12 @@ func HandleHome(w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
fi.Room.GuesserView()
|
||||
}
|
||||
// reverse actions if first action
|
||||
if len(fi.Room.ActionHistory) > 1 {
|
||||
if strings.EqualFold(fi.Room.ActionHistory[0].Action, models.ActionTypeGameStarted) {
|
||||
slices.Reverse(fi.Room.ActionHistory)
|
||||
}
|
||||
}
|
||||
}
|
||||
if fi != nil && fi.Room == nil {
|
||||
rooms, err := repo.RoomList(r.Context())
|
||||
|
Reference in New Issue
Block a user