From 528b548c5d6eaaf8feee1e0694cdb4c4b4460f06 Mon Sep 17 00:00:00 2001 From: Paul Schoenfelder Date: Thu, 27 Jun 2019 15:58:49 -0400 Subject: [PATCH] Same for update deploy --- .../com/hubspot/singularity/resources/DeployResource.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SingularityService/src/main/java/com/hubspot/singularity/resources/DeployResource.java b/SingularityService/src/main/java/com/hubspot/singularity/resources/DeployResource.java index bb2a237a2b..79dc663557 100644 --- a/SingularityService/src/main/java/com/hubspot/singularity/resources/DeployResource.java +++ b/SingularityService/src/main/java/com/hubspot/singularity/resources/DeployResource.java @@ -223,7 +223,12 @@ public SingularityRequestParent cancelDeploy(SingularityUser user, String reques ) public SingularityRequestParent updatePendingDeploy( @Parameter(hidden = true) @Auth SingularityUser user, + @Context HttpServletRequest requestContext, @RequestBody(required = true) SingularityUpdatePendingDeployRequest updateRequest) { + return maybeProxyToLeader(requestContext, SingularityRequestParent.class, updateRequest, () -> updatePendingDeploy(user, updateRequest)); + } + + public SingularityRequestParent updatePendingDeploy(SingularityUser user, SingularityUpdatePendingDeployRequest updateRequest) { SingularityRequestWithState requestWithState = fetchRequestWithState(updateRequest.getRequestId(), user); authorizationHelper.checkForAuthorization(requestWithState.getRequest(), user, SingularityAuthorizationScope.WRITE);