337b4af2514f6c8aed5dbc2cbe792973c4889d27
- Author
- Pavle Portic <git@theedgeofrage.com>
- Committer
- Pavle Portic <git@theedgeofrage.com>
- Date
Message
Reverse ordering for watched videos
Diff
1diff --git a/db/videos.go b/db/videos.go
2index 35acba5aa811f2eafadb28ca29ff5fe747a81dd3..4630f3ba94e82f2db143a275540ee7c97d626344 100644
3--- a/db/videos.go
4+++ b/db/videos.go
5@@ -67,7 +67,7 @@ var getWatchedVideosQuery = `
6 1=1
7 AND watch_timestamp IS NOT NULL
8 AND username=$1
9- ORDER BY watch_timestamp ASC
10+ ORDER BY watch_timestamp DESC
11 `
12
13 func (d *postgresDB) GetWatchedVideos(ctx context.Context, username string) ([]models.Video, error) {