aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/changes.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-07 21:49:24 +0200
committerGitHub <noreply@github.com>2020-04-07 21:49:24 +0200
commit11c8b01e1d81008bc55fed8d6f62ce39dc5459c8 (patch)
tree36f7089418825a179b5e667a2324ba0cf39f57d0 /pkg/api/handlers/compat/changes.go
parent08fa3d511f2b96613bbbe76e517f2c9288e5bf56 (diff)
parent8ae28a55acc51a02597b23140916a690fbbdc3fc (diff)
downloadpodman-11c8b01e1d81008bc55fed8d6f62ce39dc5459c8.tar.gz
podman-11c8b01e1d81008bc55fed8d6f62ce39dc5459c8.tar.bz2
podman-11c8b01e1d81008bc55fed8d6f62ce39dc5459c8.zip
Merge pull request #5739 from jwhonce/wip/diff
V2 Podman diff(changes) support
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)
+}