From 9b160745eaf55978694d2b9e46091395ed9f0aee Mon Sep 17 00:00:00 2001 From: Anthony D'Alessandro Date: Tue, 9 May 2017 23:47:01 -0400 Subject: [PATCH] Update torrent.go --- service/torrent/torrent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/torrent/torrent.go b/service/torrent/torrent.go index b29d6046..7f204ced 100644 --- a/service/torrent/torrent.go +++ b/service/torrent/torrent.go @@ -174,7 +174,7 @@ func CreateWhereParams(conditions string, params ...string) WhereParams { } func DeleteTorrent(id string) (int, error) { - var torrent model.Torrents + var torrent model.Torrent if db.ORM.First(&torrent, id).RecordNotFound() { return http.StatusNotFound, errors.New("Torrent is not found.") } @@ -184,7 +184,7 @@ func DeleteTorrent(id string) (int, error) { return http.StatusOK, nil } -func UpdateTorrent(torrent model.Torrents) (int, error) { +func UpdateTorrent(torrent model.Torrent) (int, error) { if db.ORM.Save(torrent).Error != nil { return http.StatusInternalServerError, errors.New("Torrent is not updated.") }