From d204b2f0edc533fc23c8e510218310ffb91d4f6c Mon Sep 17 00:00:00 2001 From: Will Andrews Date: Sun, 17 Nov 2024 23:16:06 +0000 Subject: [PATCH] oh maybe this --- database.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database.go b/database.go index 368fd0a..ec61906 100644 --- a/database.go +++ b/database.go @@ -182,7 +182,7 @@ func addSubscriptionForParent(db *sql.DB, parentURI, userDid, subscriptionRkey s } func getSubscribingPostParentURI(db *sql.DB, userDID, rkey string) (string, error) { - sql := "SELECT parentURI FROM subscriptions WHERE subscriptionRkey = ? AND userDID = ?;" + sql := "SELECT id, parentURI FROM subscriptions WHERE subscriptionRkey = ? AND userDID = ?;" rows, err := db.Query(sql, rkey, userDID) if err != nil { return "", fmt.Errorf("run query to get subscribing post parent URI: %w", err) @@ -192,7 +192,7 @@ func getSubscribingPostParentURI(db *sql.DB, userDID, rkey string) (string, erro parentURI := "" for rows.Next() { var subscription subscription - if err := rows.Scan(&subscription.ParentURI); err != nil { + if err := rows.Scan(&subscription.ID, &subscription.ParentURI); err != nil { return "", fmt.Errorf("scan row: %w", err) } parentURI = subscription.ParentURI -- 2.51.2