From 2a1dbd45b5d370a80208bec8cffbe21fea5e6918 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Tue, 9 Sep 2025 09:17:30 +0100 Subject: [PATCH] appview: fix vanity stat queries Signed-off-by: oppiliappan --- appview/db/profile.go | 4 ++-- appview/state/profile.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/appview/db/profile.go b/appview/db/profile.go index 70579c8..fed673c 100644 --- a/appview/db/profile.go +++ b/appview/db/profile.go @@ -553,10 +553,10 @@ func GetVanityStat(e Execer, did string, stat VanityStatKind) (uint64, error) { query = `select count(id) from pulls where owner_did = ? and state = ?` args = append(args, did, PullOpen) case VanityStatOpenIssueCount: - query = `select count(id) from issues where owner_did = ? and open = 1` + query = `select count(id) from issues where did = ? and open = 1` args = append(args, did) case VanityStatClosedIssueCount: - query = `select count(id) from issues where owner_did = ? and open = 0` + query = `select count(id) from issues where did = ? and open = 0` args = append(args, did) case VanityStatRepositoryCount: query = `select count(id) from repos where did = ?` diff --git a/appview/state/profile.go b/appview/state/profile.go index 456a5b1..4a23b17 100644 --- a/appview/state/profile.go +++ b/appview/state/profile.go @@ -17,7 +17,6 @@ import ( "github.com/gorilla/feeds" "tangled.sh/tangled.sh/core/api/tangled" "tangled.sh/tangled.sh/core/appview/db" - // "tangled.sh/tangled.sh/core/appview/oauth" "tangled.sh/tangled.sh/core/appview/pages" ) -- 2.51.2