aboutsummaryrefslogtreecommitdiff
path: root/keyserver/inthttp/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'keyserver/inthttp/server.go')
-rw-r--r--keyserver/inthttp/server.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/keyserver/inthttp/server.go b/keyserver/inthttp/server.go
index ec78b613..f3d2882c 100644
--- a/keyserver/inthttp/server.go
+++ b/keyserver/inthttp/server.go
@@ -58,4 +58,15 @@ func AddRoutes(internalAPIMux *mux.Router, s api.KeyInternalAPI) {
return util.JSONResponse{Code: http.StatusOK, JSON: &response}
}),
)
+ internalAPIMux.Handle(QueryKeyChangesPath,
+ httputil.MakeInternalAPI("queryKeyChanges", func(req *http.Request) util.JSONResponse {
+ request := api.QueryKeyChangesRequest{}
+ response := api.QueryKeyChangesResponse{}
+ if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
+ return util.MessageResponse(http.StatusBadRequest, err.Error())
+ }
+ s.QueryKeyChanges(req.Context(), &request, &response)
+ return util.JSONResponse{Code: http.StatusOK, JSON: &response}
+ }),
+ )
}