fix api docs and cosmetics

This commit is contained in:
nikk gitanes
2024-02-03 01:12:40 +03:00
parent cd830f67c9
commit 9d03b777f5
7 changed files with 41 additions and 54 deletions

View File

@@ -18,12 +18,12 @@ import (
//
// @Tags API
//
// @Param hash query string true "Torrent hash"
// @Param id query string true "File index in torrent"
// @Param hash path string true "Torrent hash"
// @Param id path string true "File index in torrent"
//
// @Produce json
// @Success 200 "Data returned from ffprobe"
// @Router /ffp [get]
// @Router /ffp/{hash}/{id} [get]
func ffp(c *gin.Context) {
hash := c.Param("hash")
indexStr := c.Param("id")

View File

@@ -19,13 +19,13 @@ import (
//
// @Tags API
//
// @Param hash query string true "Torrent hash"
// @Param id query string true "File index in torrent"
// @Param hash path string true "Torrent hash"
// @Param id path string true "File index in torrent"
// @Param not_auth query bool false "Not authenticated"
//
// @Produce application/octet-stream
// @Success 200 "Torrent data"
// @Router /play [get]
// @Router /play/{hash}/{id} [get]
func play(c *gin.Context) {
hash := c.Param("hash")
indexStr := c.Param("id")