MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getReferralCode

Function getReferralCode

server/src/db/referral-codes-db.ts:126–132  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

124}
125
126export async function getReferralCode(code: string): Promise<ReferralCode | null> {
127 const result = await query<ReferralCode>(
128 'SELECT * FROM referral_codes WHERE code = $1',
129 [code.toUpperCase()]
130 );
131 return result.rows[0] || null;
132}
133
134export async function listReferralCodes(referrerOrgId: string): Promise<ReferralDashboardRow[]> {
135 const result = await query<ReferralDashboardRow>(

Callers 3

createReferralsRouterFunction · 0.85
acceptReferralCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected