瀏覽代碼

补提交漏掉的文件

linyk 2 年之前
父節點
當前提交
9006523307
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      site/src/main/java/com/mooctest/crowd/site/controller/MixDefectController.java

+ 4 - 3
site/src/main/java/com/mooctest/crowd/site/controller/MixDefectController.java

@@ -41,9 +41,10 @@ public class MixDefectController {
     @Autowired
     private CrowdProjectService crowdProjectService;
 
-    @PostMapping("/generate/{taskCode}")
-    public ResponseVO generate(@PathVariable("taskCode") String taskCode) {
-        boolean res = mixDefectService.post(taskCode);
+    @GetMapping("/generate/{taskCode}")
+    @LoginRequired
+    public ResponseVO generate(HttpServletRequest request, @PathVariable("taskCode") String taskCode) {
+        boolean res = mixDefectService.post(RequestUtils.getUserId(request), taskCode);
         return new ResponseVO(res ? ServerCode.SUCCESS : ServerCode.ERROR);
     }