fix torrent query pointer bs
This commit is contained in:
@@ -24,7 +24,7 @@ func (m *Model) GetTorrentById(torrentId int64) (*Torrent, error) {
|
|||||||
torrent := new(Torrent)
|
torrent := new(Torrent)
|
||||||
|
|
||||||
row := m.db.QueryRowx("SELECT * FROM torrents WHERE id = ?", torrentId)
|
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)
|
return torrent, fmt.Errorf("couldn't query torrent: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user