From cae9a479da1c86e1ea3551ae644a624044e1b834 Mon Sep 17 00:00:00 2001 From: Patrick Britton Date: Sun, 8 Feb 2026 12:13:36 -0600 Subject: [PATCH] fix: remove user_id from profiles query - column doesn't exist --- admin/src/app/official-accounts/page.tsx | 1 - go-backend/internal/services/official_accounts_service.go | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/admin/src/app/official-accounts/page.tsx b/admin/src/app/official-accounts/page.tsx index 5389ef7..4a7e458 100644 --- a/admin/src/app/official-accounts/page.tsx +++ b/admin/src/app/official-accounts/page.tsx @@ -117,7 +117,6 @@ interface Config { interface OfficialProfile { profile_id: string; - user_id: string; handle: string; display_name: string; avatar_url: string; diff --git a/go-backend/internal/services/official_accounts_service.go b/go-backend/internal/services/official_accounts_service.go index ed92eb3..9fa16f6 100644 --- a/go-backend/internal/services/official_accounts_service.go +++ b/go-backend/internal/services/official_accounts_service.go @@ -611,7 +611,6 @@ func stripHTMLTags(s string) string { // OfficialProfile represents a profile with is_official = true type OfficialProfile struct { ProfileID string `json:"profile_id"` - UserID string `json:"user_id"` Handle string `json:"handle"` DisplayName string `json:"display_name"` AvatarURL string `json:"avatar_url"` @@ -625,7 +624,7 @@ type OfficialProfile struct { // along with whether they have an official_account_configs entry func (s *OfficialAccountsService) ListOfficialProfiles(ctx context.Context) ([]OfficialProfile, error) { rows, err := s.pool.Query(ctx, ` - SELECT p.id, p.user_id, p.handle, p.display_name, COALESCE(p.avatar_url, ''), + SELECT p.id, p.handle, p.display_name, COALESCE(p.avatar_url, ''), COALESCE(p.bio, ''), COALESCE(p.is_verified, false), c.id AS config_id FROM public.profiles p @@ -642,7 +641,7 @@ func (s *OfficialAccountsService) ListOfficialProfiles(ctx context.Context) ([]O for rows.Next() { var p OfficialProfile var configID *string - if err := rows.Scan(&p.ProfileID, &p.UserID, &p.Handle, &p.DisplayName, &p.AvatarURL, &p.Bio, &p.IsVerified, &configID); err != nil { + if err := rows.Scan(&p.ProfileID, &p.Handle, &p.DisplayName, &p.AvatarURL, &p.Bio, &p.IsVerified, &configID); err != nil { continue } p.ConfigID = configID