fix: close record repair and verification gaps

This commit is contained in:
bryanpedini committed 2026-11-19 15:46:12 +01:00
1 parent 9251c85fd8
commit adff599e08
27 files changed
+787 -153

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ func (s delegationStore) ZoneUsers(ctx context.Context, zone string) ([]userRow,
func (s delegationStore) UserZones(ctx context.Context, userID int64) ([]userZone, error) {
defer traceStore(ctx, "delegationStore.UserZones")()
rows, err := s.q.QueryContext(ctx,
s.t.sql("SELECT d.`zone`, d.`created_at`, EXISTS (SELECT 1 FROM {records} r WHERE r.`zone` = d.`zone`) "+
s.t.sql("SELECT d.`zone`, d.`created_at`, EXISTS (SELECT 1 FROM {records} r WHERE "+recordZoneKey("r.`zone`")+" = CAST(d.`zone` AS BINARY)) "+
"FROM {delegations} d WHERE d.`user_id` = ? ORDER BY d.`zone`"), userID)
if err != nil {
return nil, fmt.Errorf("user zones: %w", err)