fix data override on torrent edit via web

This commit is contained in:
nikk gitanes
2024-04-12 11:27:08 +03:00
parent b4e6281c5c
commit 7a5d22b8bf
4 changed files with 26 additions and 11 deletions

View File

@@ -97,7 +97,12 @@ func addTorrent(req torrReqJS, c *gin.Context) {
tor, err := torr.AddTorrent(torrSpec, req.Title, req.Poster, req.Data, req.Category)
log.TLogln("Final torrent category:", tor.Category)
if tor.Data != "" {
log.TLogln("torrent data:", tor.Data)
}
if tor.Category != "" {
log.TLogln("torrent category:", tor.Category)
}
if err != nil {
log.TLogln("error add torrent:", err)

View File

@@ -73,7 +73,12 @@ func torrentUpload(c *gin.Context) {
tor, err = torr.AddTorrent(spec, title, poster, data, category)
log.TLogln("Final torrent category:", tor.Category)
if tor.Data != "" {
log.TLogln("torrent data:", tor.Data)
}
if tor.Category != "" {
log.TLogln("torrent category:", tor.Category)
}
if err != nil {
log.TLogln("error upload torrent:", err)