-
Notifications
You must be signed in to change notification settings - Fork 5
Sweetmantech/myc 3461 api apiartistspro call existing libs to get all artist ids #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sweetmantech/myc 3461 api apiartistspro call existing libs to get all artist ids #175
Conversation
WalkthroughThe changes refactor the artist retrieval logic in the ArtistsPro controller by introducing a new Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant H as getArtistsProHandler
participant E as getEnterpriseArtists
participant EA as getAllEnterpriseAccounts
participant SA as getSubscriberAccountEmails
participant AAI as selectAccountArtistIds
participant AE as getArtistEmails
rect rgb(200, 220, 255)
Note over H,AE: New Consolidated Flow
H->>E: getEnterpriseArtists()
par Parallel Fetch
E->>EA: getAllEnterpriseAccounts()
E->>SA: getSubscriberAccountEmails()
and
EA-->>E: enterprise account IDs
SA-->>E: subscriber account emails
end
E->>AAI: selectAccountArtistIds({account_ids})
AAI-->>E: artist IDs for accounts
E-->>H: deduplicated artist list
H->>AE: getArtistEmails(artist_ids)
AE->>AAI: selectAccountArtistIds({artist_id})
AAI-->>AE: account IDs for artist
AE-->>H: artist email data
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code graph analysis (4)lib/enterprise/getEnterpriseArtists.ts (3)
lib/supabase/account_artist_ids/selectAccountArtistIds.ts (1)
lib/supabase/getArtistEmails.ts (1)
controllers/ArtistsProController/getArtistsProHandler.ts (1)
🔇 Additional comments (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit