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

Method awardPoints

server/src/db/community-db.ts:641–649  ·  view source on GitHub ↗
(userId: string, action: string, points: number, referenceId?: string, referenceType?: string)

Source from the content-addressed store, hash-verified

639 // =====================================================
640
641 async awardPoints(userId: string, action: string, points: number, referenceId?: string, referenceType?: string): Promise<void> {
642 await query(
643 `INSERT INTO community_points (workos_user_id, action, points, reference_id, reference_type)
644 VALUES ($1, $2, $3, $4, $5)
645 ON CONFLICT (workos_user_id, action, reference_id) WHERE reference_id IS NOT NULL
646 DO NOTHING`,
647 [userId, action, points, referenceId || null, referenceType || null]
648 );
649 }
650
651 async getUserPoints(userId: string): Promise<number> {
652 const result = await query<{ total: string }>(

Callers 7

createMeetingRoutersFunction · 0.95
createCommitteeRoutersFunction · 0.95
createEventsRouterFunction · 0.95
handleLumaGuestUpdatedFunction · 0.95
proposeContentForUserFunction · 0.95
createCommunityRoutersFunction · 0.80
addLeaderMethod · 0.80

Calls 1

queryFunction · 0.85

Tested by

no test coverage detected