|
@@ -4,10 +4,7 @@ import com.moekr.moocoder.logic.service.ProjectService;
|
|
|
import com.moekr.moocoder.web.dto.CodeDTO;
|
|
import com.moekr.moocoder.web.dto.CodeDTO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -30,7 +27,7 @@ public class ProjectController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/upload_file")
|
|
@PostMapping("/upload_file")
|
|
|
- public @ResponseBody String uploadProject(@RequestParam CodeDTO codeDTO) {
|
|
|
|
|
|
|
+ public @ResponseBody String uploadProject(@RequestBody CodeDTO codeDTO) {
|
|
|
return projectService.addProject(codeDTO);
|
|
return projectService.addProject(codeDTO);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|