blob: ab3408c05f9370371961c156bb65eb5c370dfcef [file] [log] [blame]
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
);
}