fix torrent query pointer bs

This commit is contained in:
2026-02-17 14:25:30 +03:00
parent 846b32f9b5
commit fa47c328cc

View File

@@ -24,7 +24,7 @@ func (m *Model) GetTorrentById(torrentId int64) (*Torrent, error) {
torrent := new(Torrent)
row := m.db.QueryRowx("SELECT * FROM torrents WHERE id = ?", torrentId)
if err := row.StructScan(&torrent); err != nil {
if err := row.StructScan(torrent); err != nil {
return torrent, fmt.Errorf("couldn't query torrent: %v", err)
}