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

Method getUserBadges

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

Source from the content-addressed store, hash-verified

657 }
658
659 async getUserBadges(userId: string): Promise<Badge[]> {
660 const result = await query<Badge & { awarded_at: string }>(
661 `SELECT b.id, b.name, b.description, b.icon, b.category, ub.awarded_at
662 FROM user_badges ub
663 JOIN badges b ON b.id = ub.badge_id
664 WHERE ub.workos_user_id = $1
665 ORDER BY ub.awarded_at DESC`,
666 [userId]
667 );
668 return result.rows;
669 }
670
671 async awardBadge(userId: string, badgeId: string): Promise<boolean> {
672 const result = await query(

Callers 2

getPersonBySlugMethod · 0.95
getHubDataMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected