blob: ab3408c05f9370371961c156bb65eb5c370dfcef [file] [log] [blame]
rootcd436562025-05-08 14:09:19 +00001package api;
2
Raverf79fdb62025-06-03 06:02:49 +00003import org.springframework.core.io.Resource;
4import org.springframework.http.ResponseEntity;
5import org.springframework.web.bind.annotation.GetMapping;
6import org.springframework.web.bind.annotation.PostMapping;
7import org.springframework.web.bind.annotation.RequestMapping;
8import org.springframework.web.bind.annotation.RequestParam;
9import org.springframework.web.bind.annotation.RestController;
10import org.springframework.web.multipart.MultipartFile;
11
12@RestController
13@RequestMapping("/api")
rootcd436562025-05-08 14:09:19 +000014public interface ApiInterface {
Raverf79fdb62025-06-03 06:02:49 +000015
16 @PostMapping("/save-torrent")
17 ResponseEntity<Integer> saveTorrent(
18 @RequestParam("userid") String userid,
19 @RequestParam("title") String title,
20 @RequestParam("tag") String tag,
21 @RequestParam("file") MultipartFile file
22 );
23
24 @GetMapping("/get-torrent")
25 ResponseEntity<Resource> getTorrent(
26 @RequestParam("seedid") String seedid,
27 @RequestParam("userid") String userid,
28 @RequestParam("ip") String ip
29 );
rootcd436562025-05-08 14:09:19 +000030}