Skip to content

Commit e87ad05

Browse files
authored
fix: properly deprecate an unused REST route (#670)
1 parent 9633861 commit e87ad05

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/main/java/com/iexec/worker/compute/ComputeController.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,18 @@ public ResponseEntity<Void> sendExitCausesForGivenComputeStage(
9999
return ok().build();
100100
}
101101

102-
@PostMapping(path = {
103-
"/iexec_out/{chainTaskId}/computed", //@Deprecated
104-
"/compute/" + ComputeStage.POST_VALUE + "/{chainTaskId}/computed"
105-
})
102+
/**
103+
* @deprecated Use /compute/post/{chainTaskId}/computed instead
104+
*/
105+
@Deprecated(forRemoval = true)
106+
@PostMapping("/iexec_out/{chainTaskId}/computed")
107+
public ResponseEntity<String> deprecatedSendComputedFileForTee(@RequestHeader("Authorization") String authorization,
108+
@PathVariable("chainTaskId") String chainTaskId,
109+
@RequestBody ComputedFile computedFile) {
110+
return sendComputedFileForTee(authorization, chainTaskId, computedFile);
111+
}
112+
113+
@PostMapping("/compute/" + ComputeStage.POST_VALUE + "/{chainTaskId}/computed")
106114
public ResponseEntity<String> sendComputedFileForTee(@RequestHeader("Authorization") String authorization,
107115
@PathVariable String chainTaskId,
108116
@RequestBody ComputedFile computedFile) {

0 commit comments

Comments
 (0)