|
|
@@ -1,12 +1,11 @@
|
|
|
package com.nju.edu.gitlab.controller;
|
|
|
|
|
|
-import com.nju.edu.gitlab.web.dto.ProjectDTO;
|
|
|
+import com.nju.edu.gitlab.web.dto.*;
|
|
|
import com.nju.edu.gitlab.web.response.EmptyResponse;
|
|
|
import com.nju.edu.gitlab.web.response.Response;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.ws.rs.Path;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/api/project")
|
|
|
@@ -16,4 +15,65 @@ public class GitlabProjectController {
|
|
|
public Response createProject(@RequestBody ProjectDTO projectDTO){
|
|
|
return new EmptyResponse();
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/userFork")
|
|
|
+ public Response forkProject(@RequestBody UserForkDTO userForkDTO){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/groupFork")
|
|
|
+ public Response groupForkProject(@RequestBody GroupForkDTO groupForkDTO){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/compare")
|
|
|
+ public Response compareProject(@RequestParam Integer projectId,
|
|
|
+ @RequestParam String fromBash,
|
|
|
+ @RequestParam String toBash){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/webhook")
|
|
|
+ public Response addWebHook(@RequestBody WebHookDTO webHookDTO){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/archive")
|
|
|
+ public Response archiveProject(@RequestParam Integer projectId){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @DeleteMapping("/{projectId}")
|
|
|
+ public Response deleteProject(@PathVariable(name = "projectId") Integer projectId){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/{projectId}/getFile")
|
|
|
+ public Response getProjectFile(@PathVariable(name = "projectId") Integer projectId,
|
|
|
+ @RequestBody ProjectFileDTO projectFileDTO){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/{projectId}/getRawFile")
|
|
|
+ public Response getProjectRawFile(@PathVariable(name = "projectId") Integer projectId,
|
|
|
+ @RequestBody ProjectRawFileDTO projectRawFileDTO){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/{projectId}/commit")
|
|
|
+ public Response createCommit(@PathVariable(name = "projectId") Integer projectId,
|
|
|
+ @RequestBody CommitDTO commitDTO){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("{projectId}/commit/{commitHash}")
|
|
|
+ public Response getAllCommitMessage(@PathVariable(name = "projectId") Integer projectId,
|
|
|
+ @PathVariable(name = "commitHash") String commitHash){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/{projectId}/branches")
|
|
|
+ public Response getAllBranches(@PathVariable(name = "projectId") Integer projectId){
|
|
|
+ return new EmptyResponse();
|
|
|
+ }
|
|
|
}
|