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

Method getUserPoints

server/src/db/community-db.ts:651–657  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

649 }
650
651 async getUserPoints(userId: string): Promise<number> {
652 const result = await query<{ total: string }>(
653 `SELECT COALESCE(SUM(points), 0) as total FROM community_points WHERE workos_user_id = $1`,
654 [userId]
655 );
656 return parseInt(result.rows[0]?.total || '0', 10);
657 }
658
659 async getUserBadges(userId: string): Promise<Badge[]> {
660 const result = await query<Badge & { awarded_at: string }>(

Callers 2

getPersonBySlugMethod · 0.95
getHubDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected