commit | f79fdb6f2c74c1534f5005c76554dea2c8808b05 | [log] [tgz] |
---|---|---|
author | Raver <22301129@bjtu.edu.cn> | Tue Jun 03 06:02:49 2025 +0000 |
committer | Raver <22301129@bjtu.edu.cn> | Wed Jun 04 09:36:20 2025 +0000 |
tree | 6b2f7fba9f17c4e5ca703bfc45557137e76994e0 | |
parent | 678fd3ebcb4a276c3a3c4a79ece00aa658f5b66b [diff] [blame] |
修改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