07af0b214fa5dd8bf19c35962541b14a4af4f921

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Fix SQL query for updating watch timestamp

Diff

 1diff --git a/db/videos.go b/db/videos.go
 2index 70440126e85e3f12a7052c48d8c0f7b13d51b487..522f5f06e5a47f7b9a8bd5bf9a3cdea4fb9fc6e2 100644
 3--- a/db/videos.go
 4+++ b/db/videos.go
 5@@ -132,7 +132,7 @@ func (d *postgresDB) AddVideo(ctx context.Context, video models.Video, channelID
 6 	return nil
 7 }
 8 
 9-const setVideoWatchTimeQuery = `UPDATE videos SET watch_timestamp = $1 WHERE video_id = $2`
10+const setVideoWatchTimeQuery = `UPDATE videos SET watch_timestamp = $1 WHERE id = $2`
11 
12 func (d *postgresDB) SetVideoWatchTime(
13 	ctx context.Context,