修改cheat文件

Change-Id: I0ffce820f7ff78b6fe5b9a714baf17814636dc19

API修改

Change-Id: I63a5b9752afcfe6f8088d2cfc065b385ee2a4464

merge

Change-Id: I783bc0349b858b16bccd1ec21623182239170df2

修改cheat文件

Change-Id: I0ffce820f7ff78b6fe5b9a714baf17814636dc19

merge

Change-Id: I783bc0349b858b16bccd1ec21623182239170df2

修改cheat文件

Change-Id: I0ffce820f7ff78b6fe5b9a714baf17814636dc19

merge

Change-Id: I783bc0349b858b16bccd1ec21623182239170df2

合并API代码

Change-Id: I5ac299271c14d247413d78b5da51adc28977e05d
diff --git a/src/main/java/api/ApiInterface.java b/src/main/java/api/ApiInterface.java
index 495226d..ab3408c 100644
--- a/src/main/java/api/ApiInterface.java
+++ b/src/main/java/api/ApiInterface.java
@@ -1,5 +1,30 @@
 package api;
 
+import org.springframework.core.io.Resource;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+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.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+@RestController
+@RequestMapping("/api")
 public interface ApiInterface {
-    
+
+    @PostMapping("/save-torrent")
+    ResponseEntity<Integer> saveTorrent(
+        @RequestParam("userid") String userid,
+        @RequestParam("title") String title,
+        @RequestParam("tag") String tag,
+        @RequestParam("file") MultipartFile file
+    );
+
+    @GetMapping("/get-torrent")
+    ResponseEntity<Resource> getTorrent(
+        @RequestParam("seedid") String seedid,
+        @RequestParam("userid") String userid,
+        @RequestParam("ip") String ip
+    );
 }
\ No newline at end of file