From 6d57d9d6a18c21a432b9308b7e56aeb9dafd6784 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Tue, 22 Oct 2024 15:56:48 -0400 Subject: [PATCH] Fix trailing whitespace in database.go --- database.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/database.go b/database.go index 616029e..741d8bf 100644 --- a/database.go +++ b/database.go @@ -1995,7 +1995,7 @@ func (db *datastore) GetMeStats(u *User) userMeStats { func (db *datastore) GetTotalCollections() (collCount int64, err error) { err = db.QueryRow(` - SELECT COUNT(*) + SELECT COUNT(*) FROM collections c LEFT JOIN users u ON u.id = c.owner_id WHERE u.status = 0`).Scan(&collCount) @@ -3121,10 +3121,10 @@ func (db *datastore) GetEmailSubscribers(collID int64, reqConfirmed bool) ([]*Em if reqConfirmed { cond = " AND confirmed = 1" } - rows, err := db.Query(`SELECT s.id, collection_id, user_id, s.email, u.email, subscribed, token, confirmed, allow_export -FROM emailsubscribers s -LEFT JOIN users u - ON u.id = user_id + rows, err := db.Query(`SELECT s.id, collection_id, user_id, s.email, u.email, subscribed, token, confirmed, allow_export +FROM emailsubscribers s +LEFT JOIN users u + ON u.id = user_id WHERE collection_id = ?`+cond+` ORDER BY subscribed DESC`, collID) if err != nil {