summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/changes.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers/compat/changes.go')
-rw-r--r--pkg/api/handlers/compat/changes.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/changes.go b/pkg/api/handlers/compat/changes.go
new file mode 100644
index 000000000..6907c487e
--- /dev/null
+++ b/pkg/api/handlers/compat/changes.go
@@ -0,0 +1,20 @@
+package compat
+
+import (
+ "net/http"
+
+ "github.com/containers/libpod/libpod"
+ "github.com/containers/libpod/pkg/api/handlers/utils"
+)
+
+func Changes(w http.ResponseWriter, r *http.Request) {
+ runtime := r.Context().Value("runtime").(*libpod.Runtime)
+
+ id := utils.GetName(r)
+ changes, err := runtime.GetDiff("", id)
+ if err != nil {
+ utils.InternalServerError(w, err)
+ return
+ }
+ utils.WriteJSON(w, 200, changes)
+}