aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/server.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 17:39:06 -0400
committerhistoria <[not public]>2026-10-05 17:39:06 -0400
commitec703a39738fefb60817f5659f76f8e683f8d301 (patch)
tree00d1242d9f94bc2fec48331d8c02909be6b37f7a /internal/admin/server.go
parent516fd29da423432ef6dfded21a984f1d15dcab1a (diff)
downloadthehouseoficarus-ec703a39738fefb60817f5659f76f8e683f8d301.tar.gz
fix: admin undo/redo failure, video poker cabinet ids, room ref behavior
Diffstat (limited to 'internal/admin/server.go')
-rw-r--r--internal/admin/server.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/admin/server.go b/internal/admin/server.go
index 8fcba77..800cfa1 100644
--- a/internal/admin/server.go
+++ b/internal/admin/server.go
@@ -908,6 +908,10 @@ func (s *AdminServer) doUndo(w http.ResponseWriter, r *http.Request) {
}
change := s.undoStack.Undo()
if change == nil {
+ if err := s.undoStack.LastError(); err != nil {
+ writeJSONError(w, "undo failed: "+err.Error(), http.StatusInternalServerError)
+ return
+ }
writeJSON(w, map[string]any{"message": "Nothing to undo"})
return
}
@@ -927,6 +931,10 @@ func (s *AdminServer) doRedo(w http.ResponseWriter, r *http.Request) {
}
change := s.undoStack.Redo()
if change == nil {
+ if err := s.undoStack.LastError(); err != nil {
+ writeJSONError(w, "redo failed: "+err.Error(), http.StatusInternalServerError)
+ return
+ }
writeJSON(w, map[string]any{"message": "Nothing to redo"})
return
}