diff options
| author | historia <[not public]> | 2026-10-05 17:39:06 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-05 17:39:06 -0400 |
| commit | ec703a39738fefb60817f5659f76f8e683f8d301 (patch) | |
| tree | 00d1242d9f94bc2fec48331d8c02909be6b37f7a /internal/admin/server.go | |
| parent | 516fd29da423432ef6dfded21a984f1d15dcab1a (diff) | |
| download | thehouseoficarus-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.go | 8 |
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 } |
