Format GetReadTime's query for consistency's sake

This commit is contained in:
jvoisin 2024-02-25 16:48:46 +01:00 committed by Frédéric Guillot
parent 8a2cc3a344
commit ccd3955bf4
1 changed files with 9 additions and 1 deletions

View File

@ -229,7 +229,15 @@ func (s *Storage) entryExists(tx *sql.Tx, entry *model.Entry) (bool, error) {
func (s *Storage) GetReadTime(entry *model.Entry, feed *model.Feed) int {
var result int
s.db.QueryRow(
`SELECT reading_time FROM entries WHERE user_id=$1 AND feed_id=$2 AND hash=$3`,
`SELECT
reading_time
FROM
entries
WHERE
user_id=$1 AND
feed_id=$2 AND
hash=$3
`,
feed.UserID,
feed.ID,
entry.Hash,