arshadmohammad commented on code in PR #161:
URL: https://github.com/apache/seatunnel-web/pull/161#discussion_r1606216705


##########
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/controller/JobExecutorController.java:
##########
@@ -44,34 +42,26 @@
 public class JobExecutorController {
 
     @Resource IJobExecutorService jobExecutorService;
-    @Resource private IJobInstanceService jobInstanceService;
 
-    @GetMapping("/execute")
-    @ApiOperation(value = "Execute synchronization tasks", httpMethod = "GET")
-    public Result<Long> jobExecutor(
+    @PostMapping("/create")
+    @ApiOperation(value = "Create synchronization tasks", httpMethod = "POST")
+    public Result<Long> jobCreate(
             @ApiParam(value = "userId", required = true) 
@RequestAttribute("userId") Integer userId,
             @ApiParam(value = "jobDefineId", required = true) 
@RequestParam("jobDefineId")
-                    Long jobDefineId) {
-        return jobExecutorService.jobExecute(userId, jobDefineId);
+            Long jobDefineId) {
+        return jobExecutorService.jobCreate(userId, jobDefineId);
     }
 
-    @GetMapping("/resource")
-    @ApiOperation(value = "get the resource for job executor", httpMethod = 
"GET")
-    public Result<JobExecutorRes> resource(
-            @ApiParam(value = "userId", required = true) @RequestParam Integer 
userId,
-            @ApiParam(value = "Job define id", required = true) @RequestParam 
Long jobDefineId)
-            throws IOException {
-        try {
-            JobExecutorRes executeResource =
-                    jobInstanceService.createExecuteResource(userId, 
jobDefineId);
-            return Result.success(executeResource);
-        } catch (Exception e) {
-            log.error("Get the resource for job executor error", e);
-            throw new SeatunnelException(SeatunnelErrorEnum.ILLEGAL_STATE, 
e.getMessage());
-        }
+    @PostMapping("/execute")
+    @ApiOperation(value = "Execute synchronization tasks", httpMethod = "Post")

Review Comment:
   httpMethod = "Post" should be changed to httpMethod = "POST"



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to